com.maverick.sshd.tunnel
Class DefaultForwardingManager

java.lang.Object
  extended by com.maverick.sshd.tunnel.DefaultForwardingManager
All Implemented Interfaces:
ForwardingManager
Direct Known Subclasses:
VTunForwardingManager

public class DefaultForwardingManager
extends Object
implements ForwardingManager

This class provides management of remote forwarding requests.

Author:
Lee David Painter

Constructor Summary
DefaultForwardingManager()
           
 
Method Summary
 LocalForwardingInterface createLocalForwardingInterface()
           
 RemoteForwardingInterface createRemoteForwardingInterface()
          Create the interface to handle the remote forwarding requests.
 RemoteForwardingInterface[] getListeningPorts()
           
 RemoteForwardingInterface[] getListeningPorts(Connection connection)
           
 RemoteForwardingInterface getRemoteInterface(int port)
           
 boolean isListening(int port)
          Is there an existing forwarding listening on a particular port?
 void openLocalForwarding(ForwardingChannel channel)
           
 boolean startRemoteForwarding(String addressToBind, int portToBind, ConnectionProtocol connection)
          Start remote forwarding.
 boolean stopRemoteForwarding(String addressToBind, int portToBind, boolean dropActiveTunnels, ConnectionProtocol connection)
          Stop remote forwarding.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultForwardingManager

public DefaultForwardingManager()
Method Detail

isListening

public boolean isListening(int port)
Description copied from interface: ForwardingManager
Is there an existing forwarding listening on a particular port?

Specified by:
isListening in interface ForwardingManager
Parameters:
port - int
Returns:
boolean

getRemoteInterface

public RemoteForwardingInterface getRemoteInterface(int port)
Specified by:
getRemoteInterface in interface ForwardingManager

startRemoteForwarding

public boolean startRemoteForwarding(String addressToBind,
                                     int portToBind,
                                     ConnectionProtocol connection)
Description copied from interface: ForwardingManager
Start remote forwarding.

Specified by:
startRemoteForwarding in interface ForwardingManager
Parameters:
addressToBind - String
portToBind - int
connection - ConnectionProtocol
Returns:
boolean

stopRemoteForwarding

public boolean stopRemoteForwarding(String addressToBind,
                                    int portToBind,
                                    boolean dropActiveTunnels,
                                    ConnectionProtocol connection)
Description copied from interface: ForwardingManager
Stop remote forwarding.

Specified by:
stopRemoteForwarding in interface ForwardingManager
Parameters:
addressToBind - String
portToBind - int
dropActiveTunnels - boolean
connection - ConnectionProtocol
Returns:
boolean

createRemoteForwardingInterface

public RemoteForwardingInterface createRemoteForwardingInterface()
Description copied from interface: ForwardingManager
Create the interface to handle the remote forwarding requests.

Specified by:
createRemoteForwardingInterface in interface ForwardingManager
Returns:

createLocalForwardingInterface

public LocalForwardingInterface createLocalForwardingInterface()

openLocalForwarding

public void openLocalForwarding(ForwardingChannel channel)
                         throws com.maverick.ssh.ChannelOpenException
Specified by:
openLocalForwarding in interface ForwardingManager
Throws:
com.maverick.ssh.ChannelOpenException

getListeningPorts

public RemoteForwardingInterface[] getListeningPorts(Connection connection)
Specified by:
getListeningPorts in interface ForwardingManager

getListeningPorts

public RemoteForwardingInterface[] getListeningPorts()
Specified by:
getListeningPorts in interface ForwardingManager


Copyright © 2012. All Rights Reserved.