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 void
addRemoteForwardingConfiguration(java.lang.String addressToBind, int portToBind)
Channel
createChannel(java.lang.String channelType, byte[] requestData)
protected ForwardingConfiguration
getLocalForwardingByAddress(java.lang.String orginatingAddress, int originatingPort)
protected ForwardingConfiguration
getRemoteForwardingByAddress(java.lang.String addressToBind, int portToBind)
GlobalRequestResponse
processGlobalRequest(java.lang.String requestName, byte[] requestData)
protected void
removeRemoteForwarding(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:
createChannel
in interfaceChannelFactory
- Throws:
InvalidChannelException
-
processGlobalRequest
public GlobalRequestResponse processGlobalRequest(java.lang.String requestName, byte[] requestData)
- Specified by:
processGlobalRequest
in 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
-
-