Package org.apache.sshd.client.channel

Examples of org.apache.sshd.client.channel.ForwardLocalPort


  @Override
  public SshPortForward forwardLocalPort(InetSocketAddress remoteSocketAddress) throws IOException, SshException {
    MinaSshConnectionWrapper sshConnection = ensureConnected();

    final ForwardLocalPort forwardLocalPort = new ForwardLocalPort(sshConnection.sshClientSession,
        remoteSocketAddress);

    forwardLocalPort.start();

    return new SshPortForward() {
      @Override
      public void close() throws IOException {
        forwardLocalPort.close();
      }

      @Override
      public InetSocketAddress getLocalSocketAddress() {
        return forwardLocalPort.getLocalSocketAddress();
      }
    };
  }
View Full Code Here

TOP

Related Classes of org.apache.sshd.client.channel.ForwardLocalPort

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.