Class ExplicitPortForwardingTracker
- java.lang.Object
-
- org.apache.sshd.client.session.forward.PortForwardingTracker
-
- org.apache.sshd.client.session.forward.ExplicitPortForwardingTracker
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,java.nio.channels.Channel,ClientSessionHolder,SessionContextHolder,SessionHolder<ClientSession>,ConnectionEndpointsIndicator
public class ExplicitPortForwardingTracker extends PortForwardingTracker implements ConnectionEndpointsIndicator
-
-
Field Summary
Fields Modifier and Type Field Description private booleanlocalForwardingprivate SshdSocketAddressremoteAddress-
Fields inherited from class org.apache.sshd.client.session.forward.PortForwardingTracker
open
-
-
Constructor Summary
Constructors Constructor Description ExplicitPortForwardingTracker(ClientSession session, boolean localForwarding, SshdSocketAddress localAddress, SshdSocketAddress remoteAddress, SshdSocketAddress boundAddress)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()SshdSocketAddressgetRemoteAddress()booleanisLocalForwarding()java.lang.StringtoString()-
Methods inherited from class org.apache.sshd.client.session.forward.PortForwardingTracker
getBoundAddress, getClientSession, getLocalAddress, getSession, isOpen
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.sshd.common.util.net.ConnectionEndpointsIndicator
getLocalAddress
-
Methods inherited from interface org.apache.sshd.common.session.SessionHolder
getSessionContext
-
-
-
-
Field Detail
-
localForwarding
private final boolean localForwarding
-
remoteAddress
private final SshdSocketAddress remoteAddress
-
-
Constructor Detail
-
ExplicitPortForwardingTracker
public ExplicitPortForwardingTracker(ClientSession session, boolean localForwarding, SshdSocketAddress localAddress, SshdSocketAddress remoteAddress, SshdSocketAddress boundAddress)
-
-
Method Detail
-
isLocalForwarding
public boolean isLocalForwarding()
-
getRemoteAddress
public SshdSocketAddress getRemoteAddress()
- Specified by:
getRemoteAddressin interfaceConnectionEndpointsIndicator- Returns:
- the socket address of remote peer.
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.nio.channels.Channel- Specified by:
closein interfacejava.io.Closeable- Throws:
java.io.IOException
-
toString
public java.lang.String toString()
- Overrides:
toStringin classPortForwardingTracker
-
-