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 boolean
localForwarding
private SshdSocketAddress
remoteAddress
-
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 void
close()
SshdSocketAddress
getRemoteAddress()
boolean
isLocalForwarding()
java.lang.String
toString()
-
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:
getRemoteAddress
in interfaceConnectionEndpointsIndicator
- Returns:
- the socket address of remote peer.
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.nio.channels.Channel
- Specified by:
close
in interfacejava.io.Closeable
- Throws:
java.io.IOException
-
toString
public java.lang.String toString()
- Overrides:
toString
in classPortForwardingTracker
-
-