Package com.sshtools.daemon.forwarding
Class ForwardingServer
- java.lang.Object
-
- com.sshtools.daemon.forwarding.ForwardingServer
-
- All Implemented Interfaces:
ChannelFactory,GlobalRequestHandler
public class ForwardingServer extends java.lang.Object implements ChannelFactory, GlobalRequestHandler
- Version:
- $Revision: 1.14 $
- Author:
- $author$
-
-
Constructor Summary
Constructors Constructor Description ForwardingServer(ConnectionProtocol connection)Creates a new ForwardingServer object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddRemoteForwardingConfiguration(java.lang.String addressToBind, int portToBind)ChannelcreateChannel(java.lang.String channelType, byte[] requestData)protected ForwardingConfigurationgetLocalForwardingByAddress(java.lang.String orginatingAddress, int originatingPort)protected ForwardingConfigurationgetRemoteForwardingByAddress(java.lang.String addressToBind, int portToBind)GlobalRequestResponseprocessGlobalRequest(java.lang.String requestName, byte[] requestData)protected voidremoveRemoteForwarding(java.lang.String addressToBind, int portToBind)
-
-
-
Constructor Detail
-
ForwardingServer
public ForwardingServer(ConnectionProtocol connection) throws java.io.IOException
Creates a new ForwardingServer object.- Parameters:
connection-- Throws:
java.io.IOException
-
-
Method Detail
-
createChannel
public Channel createChannel(java.lang.String channelType, byte[] requestData) throws InvalidChannelException
- Specified by:
createChannelin interfaceChannelFactory- Throws:
InvalidChannelException
-
processGlobalRequest
public GlobalRequestResponse processGlobalRequest(java.lang.String requestName, byte[] requestData)
- Specified by:
processGlobalRequestin interfaceGlobalRequestHandler- Parameters:
requestName-requestData-- Returns:
-
getLocalForwardingByAddress
protected ForwardingConfiguration getLocalForwardingByAddress(java.lang.String orginatingAddress, int originatingPort) throws ForwardingConfigurationException
- Parameters:
orginatingAddress-originatingPort-- Returns:
- Throws:
ForwardingConfigurationException
-
getRemoteForwardingByAddress
protected ForwardingConfiguration getRemoteForwardingByAddress(java.lang.String addressToBind, int portToBind) throws ForwardingConfigurationException
- Parameters:
addressToBind-portToBind-- Returns:
- Throws:
ForwardingConfigurationException
-
addRemoteForwardingConfiguration
protected void addRemoteForwardingConfiguration(java.lang.String addressToBind, int portToBind) throws ForwardingConfigurationException- Parameters:
addressToBind-portToBind-- Throws:
ForwardingConfigurationException
-
removeRemoteForwarding
protected void removeRemoteForwarding(java.lang.String addressToBind, int portToBind) throws ForwardingConfigurationException- Parameters:
addressToBind-portToBind-- Throws:
ForwardingConfigurationException
-
-