com.maverick.sshd
Class ForwardingChannel

java.lang.Object
  extended bycom.maverick.sshd.Channel
      extended bycom.maverick.sshd.ForwardingChannel
Direct Known Subclasses:
SocketForwardingChannel

public abstract class ForwardingChannel
extends Channel

An abstract forwarding channel implementation for use with both local and remote forwarding operations.

A forwarding channel acts as a tunnel , connections are listened for at the tunnel start point and any data is forwarded from the start point through the ssh connection and then onto the end point. Local forwards have the tunnel start point on the client, and the data flows from the start point through the client, along the ssh connection to the server, out to the endpoint which can be anywhere. Remote forwards have the tunnel start point on the Server, and the data flows from the start point through the server, along the ssh connection to the client, out to the endpoint which can be anywhere.

Author:
Lee David Painter

Nested Class Summary
 
Nested classes inherited from class com.maverick.sshd.Channel
Channel.QueuedData
 
Field Summary
protected  java.lang.String hostToConnect
          Tunnel endpoint hostname
protected  java.lang.String originatingHost
          Tunnel startpoint hostname
protected  int originatingPort
          Tunnel startpoint port number
protected  int portToConnect
          Tunnel endpoint port number
 
Fields inherited from class com.maverick.sshd.Channel
connection, localwindow, localWindowLock
 
Constructor Summary
ForwardingChannel(java.lang.String channelType, int maximumPacketSize, int initialWindowSize)
          Construct the forwarding channel.
 
Method Summary
 java.lang.String getHost()
          The hostname of the endpoint of tunnel.
 java.lang.String getOriginatingHost()
          The hostname of the startpoint of tunnel.
 int getOriginatingPort()
          The port number of the startpoint of tunnel.
 int getPort()
          The port number of the endpoint of tunnel.
 
Methods inherited from class com.maverick.sshd.Channel
addEventListener, addInputListener, addOutputListener, canClose, close, createChannel, evaluateWindowSpace, getChannelType, getConnection, getContext, getLocalId, getLocalPacket, getLocalWindow, getQueueSize, getRemoteId, getRemotePacket, getRemoteWindow, getSessionIdentifier, hasQueuedData, isClosed, isClosing, isEOF, isOpen, onChannelClosed, onChannelClosing, onChannelData, onChannelFree, onChannelOpen, onChannelOpenConfirmation, onChannelOpenFailure, onChannelRequest, onExtendedData, onLocalEOF, onRemoteClose, onRemoteEOF, onWindowAdjust, openChannel, queueSize, registerExtendedData, resetIdleState, sendChannelData, sendChannelData, sendChannelData, sendChannelData, sendChannelDataWithBuffering, sendChannelDataWithBuffering, sendChannelRequest, sendExtendedData, sendExtendedData, sendRequestResponse, sendWindowAdjust
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

hostToConnect

protected java.lang.String hostToConnect
Tunnel endpoint hostname


portToConnect

protected int portToConnect
Tunnel endpoint port number


originatingHost

protected java.lang.String originatingHost
Tunnel startpoint hostname


originatingPort

protected int originatingPort
Tunnel startpoint port number

Constructor Detail

ForwardingChannel

public ForwardingChannel(java.lang.String channelType,
                         int maximumPacketSize,
                         int initialWindowSize)
Construct the forwarding channel.

Parameters:
channelType - String
See Also:
Channel.Channel(String channelType, int maximumPacketSize, int initialWindowSize)
Method Detail

getHost

public java.lang.String getHost()
The hostname of the endpoint of tunnel.

Returns:
String

getPort

public int getPort()
The port number of the endpoint of tunnel.

Returns:
int

getOriginatingHost

public java.lang.String getOriginatingHost()
The hostname of the startpoint of tunnel.

Returns:
String

getOriginatingPort

public int getOriginatingPort()
The port number of the startpoint of tunnel.

Returns:
int


Copyright © 2003-2008 SSHTools LTD. All Rights Reserved.