Move logging out of try/catch block
[netconf.git] / netconf / netconf-netty-util / src / main / java / org / opendaylight / netconf / nettyutil / handler / ssh / client / NettyAwareClientSession.java
1 /*
2  * Copyright (c) 2019 PANTHEON.tech, s.r.o. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.netconf.nettyutil.handler.ssh.client;
9
10 import com.google.common.annotations.Beta;
11 import io.netty.channel.ChannelHandlerContext;
12 import java.io.IOException;
13 import org.opendaylight.netconf.shaded.sshd.client.session.ClientSession;
14
15 /**
16  * A {@link ClientSession} which additionally allows subsystem channels which are forwarded to a particular Netty
17  * channel context.
18  */
19 @Beta
20 public interface NettyAwareClientSession extends ClientSession {
21     /**
22      * Allocate a channel to the specified subsystem subsystem. Incoming data on the channel will be routed to the
23      * specified ChannelHandlerContext.
24      *
25      * @param subsystem The subsystem name
26      * @param ctx Context to which to route data to
27      * @return The created {@link NettyAwareChannelSubsystem}
28      * @throws IOException If failed to create the requested channel
29      */
30     NettyAwareChannelSubsystem createSubsystemChannel(String subsystem, ChannelHandlerContext ctx) throws IOException;
31 }