Package org.apache.sshd.common.forward
Interface PortForwardingInformationProvider
-
- All Known Subinterfaces:
ClientSession,ForwardingFilter,PortForwardingManager,ServerSession,Session
- All Known Implementing Classes:
AbstractClientSession,AbstractServerSession,AbstractSession,ClientSessionImpl,DefaultForwardingFilter,ServerSessionImpl,SessionHelper
public interface PortForwardingInformationProvider
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description SshdSocketAddressgetBoundLocalPortForward(int port)SshdSocketAddressgetBoundRemotePortForward(int port)java.util.List<java.util.Map.Entry<java.lang.Integer,SshdSocketAddress>>getLocalForwardsBindings()java.util.List<java.util.Map.Entry<java.lang.Integer,SshdSocketAddress>>getRemoteForwardsBindings()java.util.NavigableSet<java.lang.Integer>getStartedLocalPortForwards()java.util.NavigableSet<java.lang.Integer>getStartedRemotePortForwards()default booleanisLocalPortForwardingStartedForPort(int port)Test if local port forwarding is starteddefault booleanisRemotePortForwardingStartedForPort(int port)Test if remote port forwarding is started
-
-
-
Method Detail
-
getStartedLocalPortForwards
java.util.NavigableSet<java.lang.Integer> getStartedLocalPortForwards()
- Returns:
- A
NavigableSetsnapshot of the currently started local port forwards
-
getBoundLocalPortForward
SshdSocketAddress getBoundLocalPortForward(int port)
- Parameters:
port- The port number- Returns:
- The local bound
SshdSocketAddressfor the port -nullif none bound - See Also:
isLocalPortForwardingStartedForPort,getStartedLocalPortForwards()
-
getLocalForwardsBindings
java.util.List<java.util.Map.Entry<java.lang.Integer,SshdSocketAddress>> getLocalForwardsBindings()
- Returns:
- A snapshot of the currently bound forwarded local ports
as "pairs" of port + bound
SshdSocketAddress
-
isLocalPortForwardingStartedForPort
default boolean isLocalPortForwardingStartedForPort(int port)
Test if local port forwarding is started- Parameters:
port- The local port- Returns:
trueif local port forwarding is started- See Also:
getBoundLocalPortForward
-
getStartedRemotePortForwards
java.util.NavigableSet<java.lang.Integer> getStartedRemotePortForwards()
- Returns:
- A
NavigableSetsnapshot of the currently started remote port forwards
-
getBoundRemotePortForward
SshdSocketAddress getBoundRemotePortForward(int port)
- Parameters:
port- The port number- Returns:
- The remote bound
SshdSocketAddressfor the port -nullif none bound - See Also:
isRemotePortForwardingStartedForPort,getStartedRemotePortForwards()
-
getRemoteForwardsBindings
java.util.List<java.util.Map.Entry<java.lang.Integer,SshdSocketAddress>> getRemoteForwardsBindings()
- Returns:
- A snapshot of the currently bound forwarded remote ports
as "pairs" of port + bound
SshdSocketAddress
-
isRemotePortForwardingStartedForPort
default boolean isRemotePortForwardingStartedForPort(int port)
Test if remote port forwarding is started- Parameters:
port- The remote port- Returns:
trueif remote port forwarding is started- See Also:
getBoundRemotePortForward
-
-