Top Description Inners Fields Constructors Methods
org.apache.sshd.common.forward

public Class DefaultForwarder

extends AbstractInnerCloseable
implements Forwarder, SessionHolder<Session>
Class Inheritance
All Implemented Interfaces
org.apache.sshd.common.session.SessionHolder, org.apache.sshd.common.session.SessionContextHolder, org.apache.sshd.common.forward.Forwarder, org.apache.sshd.common.Closeable, java.nio.channels.Channel, java.io.Closeable, java.lang.AutoCloseable, org.apache.sshd.common.forward.PortForwardingEventListenerManagerHolder, org.apache.sshd.common.forward.PortForwardingEventListenerManager, org.apache.sshd.common.forward.PortForwardingManager, org.apache.sshd.common.forward.PortForwardingInformationProvider
Imports
java.io.IOException, java.net.InetAddress, .InetSocketAddress, .SocketAddress, java.time.Duration, java.util.AbstractMap.SimpleImmutableEntry, .ArrayList, .Collection, .Collections, .EnumSet, .HashMap, .HashSet, .List, .Map, .NavigableSet, .Objects, .Set, java.util.concurrent.CopyOnWriteArraySet, java.util.concurrent.atomic.AtomicLong, java.util.stream.Collectors, org.apache.sshd.client.channel.ClientChannelEvent, org.apache.sshd.common.Closeable, .Factory, .FactoryManager, .RuntimeSshException, .SshConstants, .SshException, org.apache.sshd.common.channel.StreamingChannel.Streaming, org.apache.sshd.common.io.IoAcceptor, .IoHandler, .IoHandlerFactory, .IoServiceFactory, .IoSession, org.apache.sshd.common.session.ConnectionService, .Session, .SessionHolder, org.apache.sshd.common.util.EventListenerUtils, .ExceptionUtils, .GenericUtils, .Readable, .ValidateUtils, org.apache.sshd.common.util.buffer.Buffer, .ByteArrayBuffer, org.apache.sshd.common.util.closeable.AbstractInnerCloseable, org.apache.sshd.common.util.io.functors.Invoker, org.apache.sshd.common.util.net.SshdSocketAddress, org.apache.sshd.common.util.threads.ThreadUtils, org.apache.sshd.core.CoreModuleProperties, org.apache.sshd.server.forward.TcpForwardingFilter

Requests a "tcpip-forward" action
Author
Apache MINA SSHD Project

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv class

Field Summary

Modifier and TypeField and Description
private final Map<Integer, InetSocketAddress>
private final Map<SshdSocketAddress, InetSocketAddress>
private IoAcceptor
private final Map<Integer, SocksProxy>
private final Object
private final PortForwardingEventListener
private final Collection<PortForwardingEventListener>
private IoAcceptor
private final Set<LocalForwardingEntry>
private final Object
private final Map<SshdSocketAddress, SshdSocketAddress>
private final Collection<PortForwardingEventListenerManager>
private final Map<Integer, SshdSocketAddress>
private final ConnectionService
private final Session
private final IoHandlerFactory
public static final Set<ClientChannelEvent>
private final IoHandlerFactory

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
public boolean
protected IoAcceptor
createIoAcceptor(Factory<? extends IoHandler> handlerFactory)

protected InetSocketAddress

Returns:

The InetSocketAddress to which the binding occurred
doBind
(SshdSocketAddress
The request bind address
address
,
IoAcceptor
An IoAcceptor to bind addresses
acceptor
)

public List<SshdSocketAddress>
public SshdSocketAddress
public final ConnectionService
protected Collection<PortForwardingEventListener>
protected IoAcceptor
public synchronized SshdSocketAddress
protected synchronized Closeable
public List<Map.Entry<SshdSocketAddress, SshdSocketAddress>>
protected IoAcceptor
public PortForwardingEventListener
public Collection<PortForwardingEventListenerManager>
public List<Map.Entry<Integer, SshdSocketAddress>>
public Session
public List<SshdSocketAddress>
public NavigableSet<Integer>
protected void
protected void
protected void
public boolean
public synchronized void
localPortForwardingCancelled(SshdSocketAddress local)

Implements org.apache.sshd.common.forward.Forwarder.localPortForwardingCancelled.

Called when the other side cancelled a remote port forward.

public synchronized SshdSocketAddress
localPortForwardingRequested(SshdSocketAddress
The request address
local
)

Implements org.apache.sshd.common.forward.Forwarder.localPortForwardingRequested.

Called when the other side requested a remote port forward.

protected void
preClose()

Overrides org.apache.sshd.common.util.closeable.AbstractCloseable.preClose.

preClose is guaranteed to be called before doCloseGracefully or doCloseImmediately.

public void
public boolean
protected void
protected void
protected void
signalEstablishedExplicitTunnel(SshdSocketAddress local, SshdSocketAddress remote, boolean localForwarding, SshdSocketAddress boundAddress, Throwable reason)

protected void
protected void
protected void
protected void
protected void
protected void
protected void
protected void
signalTearingDownExplicitTunnel(SshdSocketAddress boundAddress, boolean localForwarding, SshdSocketAddress remote)

protected void
signalTearingDownExplicitTunnel(PortForwardingEventListener listener, SshdSocketAddress boundAddress, boolean localForwarding, SshdSocketAddress remoteAddress)

protected void
protected void
protected void
signalTornDownExplicitTunnel(SshdSocketAddress boundAddress, boolean localForwarding, SshdSocketAddress remoteAddress, Throwable reason)

protected void
signalTornDownExplicitTunnel(PortForwardingEventListener listener, SshdSocketAddress boundAddress, boolean localForwarding, SshdSocketAddress remoteAddress, Throwable reason)

public synchronized SshdSocketAddress
startDynamicPortForwarding(SshdSocketAddress
The local address
local
)

Implements org.apache.sshd.common.forward.PortForwardingManager.startDynamicPortForwarding.

Start dynamic local port forwarding using a SOCKS proxy.

public synchronized SshdSocketAddress
startLocalPortForwarding(SshdSocketAddress
The local address
local
,
SshdSocketAddress
The remote address
remote
)

Implements org.apache.sshd.common.forward.PortForwardingManager.startLocalPortForwarding.

Start forwarding the given local address on the client to the given address on the server.

public synchronized SshdSocketAddress
startRemotePortForwarding(SshdSocketAddress
The remote address
remote
,
SshdSocketAddress
The local address
local
)

Implements org.apache.sshd.common.forward.PortForwardingManager.startRemotePortForwarding.

Start forwarding tcpip from the given address on the server to the given address on the client.

public synchronized void
stopDynamicPortForwarding(SshdSocketAddress
The local address
local
)

Implements org.apache.sshd.common.forward.PortForwardingManager.stopDynamicPortForwarding.

Stop a previously started dynamic port forwarding.

public synchronized void
stopLocalPortForwarding(SshdSocketAddress
The local address
local
)

Implements org.apache.sshd.common.forward.PortForwardingManager.stopLocalPortForwarding.

Stop forwarding the given local address.

public synchronized void
stopRemotePortForwarding(SshdSocketAddress
The remote address
remote
)

Implements org.apache.sshd.common.forward.PortForwardingManager.stopRemotePortForwarding.

Stop forwarding of the given remote address.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

protected void
protected void
Inherited from org.apache.sshd.common.util.closeable.AbstractInnerCloseable:
doCloseGracefullydoCloseImmediately