2 * Copyright (c) 2023 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.transport.ssh;
10 import java.io.IOException;
11 import org.opendaylight.netconf.shaded.sshd.client.session.ClientSessionImpl;
12 import org.opendaylight.netconf.shaded.sshd.common.io.IoSession;
15 * Our own version of {@link ClientSessionImpl}, bound to a backend Netty channel.
17 final class TransportClientSession extends ClientSessionImpl {
18 TransportClientSession(final TransportSshClient client, final IoSession ioSession) throws Exception {
19 super(client, ioSession);
23 public TransportClientSubsystem createSubsystemChannel(final String subsystem) throws IOException {
24 final var channel = new TransportClientSubsystem(subsystem);
25 final var service = getConnectionService();
26 final var id = service.registerChannel(channel);
27 if (log.isDebugEnabled()) {
28 log.debug("createSubsystemChannel({})[{}] created id={}", this, subsystem, id);