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

public Class DefaultForwarderFactory

extends Object
implements ForwarderFactory, PortForwardingEventListenerManager
Class Inheritance
All Implemented Interfaces
org.apache.sshd.common.forward.PortForwardingEventListenerManager, org.apache.sshd.common.forward.ForwarderFactory
Imports
java.util.Collection, java.util.concurrent.CopyOnWriteArraySet, org.apache.sshd.common.session.ConnectionService, org.apache.sshd.common.util.EventListenerUtils

The default ForwarderFactory implementation.
Author
Apache MINA SSHD Project

Field Summary

Modifier and TypeField and Description
public static final DefaultForwarderFactory
private final PortForwardingEventListener
private final Collection<PortForwardingEventListener>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
public Forwarder
create(ConnectionService
the ConnectionService the connections are forwarded through
service
)

Implements org.apache.sshd.common.forward.ForwarderFactory.create.

Creates the forwarder to be used for TCP/IP port forwards for this session.

public PortForwardingEventListener
public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

INSTANCEback to summary
public static final DefaultForwarderFactory INSTANCE
listenerProxyback to summary
private final PortForwardingEventListener listenerProxy
listenersback to summary
private final Collection<PortForwardingEventListener> listeners

Constructor Detail

DefaultForwarderFactoryback to summary
public DefaultForwarderFactory()

Method Detail

addPortForwardingEventListenerback to summary
public void addPortForwardingEventListener(PortForwardingEventListener listener)

Implements org.apache.sshd.common.forward.PortForwardingEventListenerManager.addPortForwardingEventListener.

Doc from org.apache.sshd.common.forward.PortForwardingEventListenerManager.addPortForwardingEventListener.

Add a port forwarding listener

Parameters
listener:PortForwardingEventListener

The PortForwardingEventListener to add - never null

Annotations
@Override
createback to summary
public Forwarder create(ConnectionService service)

Implements org.apache.sshd.common.forward.ForwarderFactory.create.

Doc from org.apache.sshd.common.forward.ForwarderFactory.create.

Creates the forwarder to be used for TCP/IP port forwards for this session.

Parameters
service:ConnectionService

the ConnectionService the connections are forwarded through

Returns:Forwarder

the Forwarder that will listen for connections and set up forwarding

Annotations
@Override
getPortForwardingEventListenerProxyback to summary
public PortForwardingEventListener getPortForwardingEventListenerProxy()

Implements org.apache.sshd.common.forward.PortForwardingEventListenerManager.getPortForwardingEventListenerProxy.

Returns:PortForwardingEventListener

Doc from org.apache.sshd.common.forward.PortForwardingEventListenerManager.getPortForwardingEventListenerProxy.

A proxy listener representing all the currently registered listener through this manager

Annotations
@Override
removePortForwardingEventListenerback to summary
public void removePortForwardingEventListener(PortForwardingEventListener listener)

Implements org.apache.sshd.common.forward.PortForwardingEventListenerManager.removePortForwardingEventListener.

Doc from org.apache.sshd.common.forward.PortForwardingEventListenerManager.removePortForwardingEventListener.

Remove a port forwarding listener

Parameters
listener:PortForwardingEventListener

The PortForwardingEventListener to remove - ignored if null

Annotations
@Override