2 * Copyright (c) 2019 PANTHEON.tech, s.r.o. and others. All rights reserved.
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
8 package org.opendaylight.netconf.nettyutil.handler.ssh.client;
10 import io.netty.channel.ChannelHandlerContext;
11 import io.netty.channel.ChannelPipeline;
12 import java.io.IOException;
13 import org.opendaylight.netconf.shaded.sshd.client.channel.ChannelSubsystem;
14 import org.opendaylight.netconf.shaded.sshd.client.session.ClientSession;
17 * A {@link ClientSession} which additionally allows subsystem channels which are forwarded to a particular Netty
20 @Deprecated(since = "7.0.0", forRemoval = true)
21 public interface NettyAwareClientSession extends ClientSession {
23 * Allocate a channel to the specified subsystem. Incoming data on the channel will be routed to the
24 * specified {@link ChannelHandlerContext}.
26 * @param subsystem The subsystem name
27 * @param ctx Context to which to route data to
28 * @return The created {@link ChannelSubsystem}
29 * @throws IOException If failed to create the requested channel
31 ChannelSubsystem createSubsystemChannel(String subsystem, ChannelHandlerContext ctx) throws IOException;
34 * Allocate a channel to the specified subsystem. Incoming data on the channel will be routed to the
35 * specified {@link ChannelPipeline}.
37 * @param subsystem The subsystem name
38 * @param pipeline ChannelPipeline to which to route data to
39 * @return The created {@link ChannelSubsystem}
40 * @throws IOException If failed to create the requested channel
42 ChannelSubsystem createSubsystemChannel(String subsystem, ChannelPipeline pipeline) throws IOException;