Package com.sshtools.j2ssh.forwarding
Class ForwardingClient
java.lang.Object
com.sshtools.j2ssh.forwarding.ForwardingClient
- All Implemented Interfaces:
ChannelFactory
- Version:
- $Revision: 1.37 $
- Author:
- $author$
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionForwardingClient(ConnectionProtocol connection) Creates a new ForwardingClient object. -
Method Summary
Modifier and TypeMethodDescriptionaddLocalForwarding(String uniqueName, String addressToBind, int portToBind, String hostToConnect, int portToConnect) voidvoidaddRemoteForwarding(String uniqueName, String addressToBind, int portToBind, String hostToConnect, int portToConnect) createChannel(String channelType, byte[] requestData) voidenableX11Forwarding(XDisplay localDisplay) getLocalForwardingByAddress(String addressToBind, int portToBind) getRemoteForwardingByAddress(String addressToBind, int portToBind) booleanbooleanvoidremoveLocalForwarding(String name) voidremoveRemoteForwarding(String name) voidstartLocalForwarding(String uniqueName) voidstartRemoteForwarding(String name) voidvoidstopLocalForwarding(String uniqueName) voidstopRemoteForwarding(String name) voidsynchronizeConfiguration(SshConnectionProperties properties)
-
Field Details
-
REMOTE_FORWARD_REQUEST
- See Also:
-
REMOTE_FORWARD_CANCEL_REQUEST
- See Also:
-
-
Constructor Details
-
ForwardingClient
Creates a new ForwardingClient object.- Parameters:
connection-- Throws:
IOException
-
-
Method Details
-
getChannelType
- Returns:
-
enableX11Forwarding
- Parameters:
localDisplay-
-
getX11ForwardingConfiguration
- Returns:
-
hasActiveConfigurations
public boolean hasActiveConfigurations()- Returns:
-
synchronizeConfiguration
-
hasActiveForwardings
public boolean hasActiveForwardings()- Returns:
-
getLocalForwardingByAddress
public ForwardingConfiguration getLocalForwardingByAddress(String addressToBind, int portToBind) throws ForwardingConfigurationException - Parameters:
addressToBind-portToBind-- Returns:
- Throws:
ForwardingConfigurationException
-
getLocalForwardingByName
public ForwardingConfiguration getLocalForwardingByName(String name) throws ForwardingConfigurationException - Parameters:
name-- Returns:
- Throws:
ForwardingConfigurationException
-
getRemoteForwardingByName
public ForwardingConfiguration getRemoteForwardingByName(String name) throws ForwardingConfigurationException - Parameters:
name-- Returns:
- Throws:
ForwardingConfigurationException
-
getLocalForwardings
- Returns:
-
getRemoteForwardings
- Returns:
-
getRemoteForwardingByAddress
public ForwardingConfiguration getRemoteForwardingByAddress(String addressToBind, int portToBind) throws ForwardingConfigurationException - Parameters:
addressToBind-portToBind-- Returns:
- Throws:
ForwardingConfigurationException
-
removeLocalForwarding
- Parameters:
name-- Throws:
ForwardingConfigurationException
-
removeRemoteForwarding
public void removeRemoteForwarding(String name) throws IOException, ForwardingConfigurationException - Parameters:
name-- Throws:
IOExceptionForwardingConfigurationException
-
addLocalForwarding
public ForwardingConfiguration addLocalForwarding(String uniqueName, String addressToBind, int portToBind, String hostToConnect, int portToConnect) throws ForwardingConfigurationException - Parameters:
uniqueName-addressToBind-portToBind-hostToConnect-portToConnect-- Returns:
- Throws:
ForwardingConfigurationException
-
addLocalForwarding
public ForwardingConfiguration addLocalForwarding(ForwardingConfiguration fwd) throws ForwardingConfigurationException - Parameters:
fwd-- Returns:
- Throws:
ForwardingConfigurationException
-
addRemoteForwarding
public void addRemoteForwarding(String uniqueName, String addressToBind, int portToBind, String hostToConnect, int portToConnect) throws ForwardingConfigurationException - Parameters:
uniqueName-addressToBind-portToBind-hostToConnect-portToConnect-- Throws:
ForwardingConfigurationException
-
addRemoteForwarding
public void addRemoteForwarding(ForwardingConfiguration fwd) throws ForwardingConfigurationException - Parameters:
fwd-- Throws:
ForwardingConfigurationException
-
createChannel
- Specified by:
createChannelin interfaceChannelFactory- Parameters:
channelType-requestData-- Returns:
- Throws:
InvalidChannelException
-
startLocalForwarding
- Parameters:
uniqueName-- Throws:
ForwardingConfigurationException
-
startX11Forwarding
-
startRemoteForwarding
- Parameters:
name-- Throws:
IOExceptionForwardingConfigurationException
-
stopLocalForwarding
- Parameters:
uniqueName-- Throws:
ForwardingConfigurationException
-
stopRemoteForwarding
- Parameters:
name-- Throws:
IOExceptionForwardingConfigurationException
-