Class PortForwardingTracker
- java.lang.Object
-
- org.apache.sshd.client.session.forward.PortForwardingTracker
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,java.nio.channels.Channel
,ClientSessionHolder
,SessionContextHolder
,SessionHolder<ClientSession>
- Direct Known Subclasses:
DynamicPortForwardingTracker
,ExplicitPortForwardingTracker
public abstract class PortForwardingTracker extends java.lang.Object implements java.nio.channels.Channel, SessionHolder<ClientSession>, ClientSessionHolder
-
-
Field Summary
Fields Modifier and Type Field Description private SshdSocketAddress
boundAddress
private SshdSocketAddress
localAddress
protected java.util.concurrent.atomic.AtomicBoolean
open
private ClientSession
session
-
Constructor Summary
Constructors Modifier Constructor Description protected
PortForwardingTracker(ClientSession session, SshdSocketAddress localAddress, SshdSocketAddress boundAddress)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SshdSocketAddress
getBoundAddress()
ClientSession
getClientSession()
SshdSocketAddress
getLocalAddress()
ClientSession
getSession()
boolean
isOpen()
java.lang.String
toString()
-
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.session.SessionHolder
getSessionContext
-
-
-
-
Field Detail
-
open
protected final java.util.concurrent.atomic.AtomicBoolean open
-
session
private final ClientSession session
-
localAddress
private final SshdSocketAddress localAddress
-
boundAddress
private final SshdSocketAddress boundAddress
-
-
Constructor Detail
-
PortForwardingTracker
protected PortForwardingTracker(ClientSession session, SshdSocketAddress localAddress, SshdSocketAddress boundAddress)
-
-
Method Detail
-
isOpen
public boolean isOpen()
- Specified by:
isOpen
in interfacejava.nio.channels.Channel
-
getLocalAddress
public SshdSocketAddress getLocalAddress()
-
getBoundAddress
public SshdSocketAddress getBoundAddress()
-
getClientSession
public ClientSession getClientSession()
- Specified by:
getClientSession
in interfaceClientSessionHolder
- Returns:
- The underlying
ClientSession
used
-
getSession
public ClientSession getSession()
- Specified by:
getSession
in interfaceSessionHolder<ClientSession>
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-