com.maverick.sshd.tunnel
Class LocalForwardingChannel

java.lang.Object
  extended by com.maverick.sshd.Channel
      extended by com.maverick.sshd.tunnel.ForwardingChannel
          extended by com.maverick.sshd.tunnel.SocketForwardingChannel
              extended by com.maverick.sshd.tunnel.LocalForwardingChannel
All Implemented Interfaces:
com.maverick.ssh.components.SshComponent

public class LocalForwardingChannel
extends SocketForwardingChannel

Implements a Local forwarding channel for use with forwarding sockets from the client machine through the server to some endpoint reachable from the server machine.

Author:
Lee David Painter

Nested Class Summary
 
Nested classes/interfaces inherited from class com.maverick.sshd.tunnel.SocketForwardingChannel
SocketForwardingChannel.QueuedData
 
Field Summary
static String CHANNEL_TYPE
           
 
Fields inherited from class com.maverick.sshd.tunnel.ForwardingChannel
hostToConnect, originatingHost, originatingPort, portToConnect
 
Fields inherited from class com.maverick.sshd.Channel
connection, localwindow, localWindowLock, state
 
Constructor Summary
LocalForwardingChannel()
           
 
Method Summary
protected  byte[] createChannel()
          Create the forwarding channel.
 void finishConnect(org.apache.mina.core.session.IoSession session, boolean socketOpen)
          Called when the forwarded socket has been connected.
protected  byte[] openChannel(byte[] requestdata)
          Open a forwarding channel.
 
Methods inherited from class com.maverick.sshd.tunnel.SocketForwardingChannel
canClose, evaluateClosure, evaluateWindowSpace, onChannelClosed, onChannelClosing, onChannelData, onChannelFree, onChannelOpen, onChannelOpenConfirmation, onChannelRequest, onExtendedData, onLocalEOF, onRemoteClose, onRemoteEOF, sendChannelData
 
Methods inherited from class com.maverick.sshd.tunnel.ForwardingChannel
getHost, getInformation, getOriginatingHost, getOriginatingPort, getPort
 
Methods inherited from class com.maverick.sshd.Channel
addEventListener, addInputListener, addOutputListener, close, getConnection, getContext, getLocalId, getLocalPacket, getLocalWindow, getName, getQueueSize, getRemoteId, getRemotePacket, getRemoteWindow, getSessionIdentifier, hasQueuedData, idle, isClosed, isClosing, isEOF, isLocalEOF, isOpen, isRemoteEOF, onChannelOpenFailure, onWindowAdjust, queueSize, registerExtendedData, removeEventListener, sendChannelData, sendChannelRequest, sendEOF, sendExtendedData, sendRequestResponse, sendWindowAdjust
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CHANNEL_TYPE

public static final String CHANNEL_TYPE
See Also:
Constant Field Values
Constructor Detail

LocalForwardingChannel

public LocalForwardingChannel()
Method Detail

createChannel

protected byte[] createChannel()
Create the forwarding channel.

Specified by:
createChannel in class SocketForwardingChannel
Returns:
byte[]

openChannel

protected byte[] openChannel(byte[] requestdata)
                      throws WriteOperationRequest,
                             com.maverick.ssh.ChannelOpenException
Open a forwarding channel.

Specified by:
openChannel in class SocketForwardingChannel
Parameters:
requestdata - byte[]
Returns:
byte[]
Throws:
WriteOperationRequest
com.maverick.ssh.ChannelOpenException

finishConnect

public void finishConnect(org.apache.mina.core.session.IoSession session,
                          boolean socketOpen)
Called when the forwarded socket has been connected.

Parameters:
key - SelectionKey


Copyright © 2012. All Rights Reserved.