com.sshtools.j2ssh.forwarding
Class ForwardingClient

java.lang.Object
  extended by com.sshtools.j2ssh.forwarding.ForwardingClient
All Implemented Interfaces:
ChannelFactory

public class ForwardingClient
extends java.lang.Object
implements ChannelFactory

Version:
$Revision: 1.37 $
Author:
$author$

Nested Class Summary
 class ForwardingClient.ClientForwardingListener
           
 
Field Summary
static java.lang.String REMOTE_FORWARD_CANCEL_REQUEST
           
static java.lang.String REMOTE_FORWARD_REQUEST
           
 
Constructor Summary
ForwardingClient(ConnectionProtocol connection)
          Creates a new ForwardingClient object.
 
Method Summary
 ForwardingConfiguration addLocalForwarding(ForwardingConfiguration fwd)
           
 ForwardingConfiguration addLocalForwarding(java.lang.String uniqueName, java.lang.String addressToBind, int portToBind, java.lang.String hostToConnect, int portToConnect)
           
 void addRemoteForwarding(ForwardingConfiguration fwd)
           
 void addRemoteForwarding(java.lang.String uniqueName, java.lang.String addressToBind, int portToBind, java.lang.String hostToConnect, int portToConnect)
           
 Channel createChannel(java.lang.String channelType, byte[] requestData)
           
 void enableX11Forwarding(XDisplay localDisplay)
           
 java.util.List getChannelType()
           
 ForwardingConfiguration getLocalForwardingByAddress(java.lang.String addressToBind, int portToBind)
           
 ForwardingConfiguration getLocalForwardingByName(java.lang.String name)
           
 java.util.Map getLocalForwardings()
           
 ForwardingConfiguration getRemoteForwardingByAddress(java.lang.String addressToBind, int portToBind)
           
 ForwardingConfiguration getRemoteForwardingByName(java.lang.String name)
           
 java.util.Map getRemoteForwardings()
           
 ForwardingConfiguration getX11ForwardingConfiguration()
           
 boolean hasActiveConfigurations()
           
 boolean hasActiveForwardings()
           
 void removeLocalForwarding(java.lang.String name)
           
 void removeRemoteForwarding(java.lang.String name)
           
 void startLocalForwarding(java.lang.String uniqueName)
           
 void startRemoteForwarding(java.lang.String name)
           
 void startX11Forwarding()
           
 void stopLocalForwarding(java.lang.String uniqueName)
           
 void stopRemoteForwarding(java.lang.String name)
           
 void synchronizeConfiguration(SshConnectionProperties properties)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REMOTE_FORWARD_REQUEST

public static final java.lang.String REMOTE_FORWARD_REQUEST
See Also:
Constant Field Values

REMOTE_FORWARD_CANCEL_REQUEST

public static final java.lang.String REMOTE_FORWARD_CANCEL_REQUEST
See Also:
Constant Field Values
Constructor Detail

ForwardingClient

public ForwardingClient(ConnectionProtocol connection)
                 throws java.io.IOException
Creates a new ForwardingClient object.

Parameters:
connection -
Throws:
java.io.IOException
Method Detail

getChannelType

public java.util.List getChannelType()
Returns:

enableX11Forwarding

public void enableX11Forwarding(XDisplay localDisplay)
Parameters:
localDisplay -

getX11ForwardingConfiguration

public ForwardingConfiguration getX11ForwardingConfiguration()
Returns:

hasActiveConfigurations

public boolean hasActiveConfigurations()
Returns:

synchronizeConfiguration

public void synchronizeConfiguration(SshConnectionProperties properties)

hasActiveForwardings

public boolean hasActiveForwardings()
Returns:

getLocalForwardingByAddress

public ForwardingConfiguration getLocalForwardingByAddress(java.lang.String addressToBind,
                                                           int portToBind)
                                                    throws ForwardingConfigurationException
Parameters:
addressToBind -
portToBind -
Returns:
Throws:
ForwardingConfigurationException

getLocalForwardingByName

public ForwardingConfiguration getLocalForwardingByName(java.lang.String name)
                                                 throws ForwardingConfigurationException
Parameters:
name -
Returns:
Throws:
ForwardingConfigurationException

getRemoteForwardingByName

public ForwardingConfiguration getRemoteForwardingByName(java.lang.String name)
                                                  throws ForwardingConfigurationException
Parameters:
name -
Returns:
Throws:
ForwardingConfigurationException

getLocalForwardings

public java.util.Map getLocalForwardings()
Returns:

getRemoteForwardings

public java.util.Map getRemoteForwardings()
Returns:

getRemoteForwardingByAddress

public ForwardingConfiguration getRemoteForwardingByAddress(java.lang.String addressToBind,
                                                            int portToBind)
                                                     throws ForwardingConfigurationException
Parameters:
addressToBind -
portToBind -
Returns:
Throws:
ForwardingConfigurationException

removeLocalForwarding

public void removeLocalForwarding(java.lang.String name)
                           throws ForwardingConfigurationException
Parameters:
name -
Throws:
ForwardingConfigurationException

removeRemoteForwarding

public void removeRemoteForwarding(java.lang.String name)
                            throws java.io.IOException,
                                   ForwardingConfigurationException
Parameters:
name -
Throws:
java.io.IOException
ForwardingConfigurationException

addLocalForwarding

public ForwardingConfiguration addLocalForwarding(java.lang.String uniqueName,
                                                  java.lang.String addressToBind,
                                                  int portToBind,
                                                  java.lang.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(java.lang.String uniqueName,
                                java.lang.String addressToBind,
                                int portToBind,
                                java.lang.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

public Channel createChannel(java.lang.String channelType,
                             byte[] requestData)
                      throws InvalidChannelException
Specified by:
createChannel in interface ChannelFactory
Parameters:
channelType -
requestData -
Returns:
Throws:
InvalidChannelException

startLocalForwarding

public void startLocalForwarding(java.lang.String uniqueName)
                          throws ForwardingConfigurationException
Parameters:
uniqueName -
Throws:
ForwardingConfigurationException

startX11Forwarding

public void startX11Forwarding()
                        throws java.io.IOException,
                               ForwardingConfigurationException
Throws:
java.io.IOException
ForwardingConfigurationException

startRemoteForwarding

public void startRemoteForwarding(java.lang.String name)
                           throws java.io.IOException,
                                  ForwardingConfigurationException
Parameters:
name -
Throws:
java.io.IOException
ForwardingConfigurationException

stopLocalForwarding

public void stopLocalForwarding(java.lang.String uniqueName)
                         throws ForwardingConfigurationException
Parameters:
uniqueName -
Throws:
ForwardingConfigurationException

stopRemoteForwarding

public void stopRemoteForwarding(java.lang.String name)
                          throws java.io.IOException,
                                 ForwardingConfigurationException
Parameters:
name -
Throws:
java.io.IOException
ForwardingConfigurationException


Copyright © 2002-2003 Lee David Painter & Contributors. All Rights Reserved.