com.maverick.sshd.vtun
Class VTunBoundForwardingChannel

java.lang.Object
  extended by com.maverick.sshd.Channel
      extended by com.maverick.sshd.tunnel.ForwardingChannel
          extended by com.maverick.sshd.vtun.VTunForwardingChannel
              extended by com.maverick.sshd.vtun.VTunBoundForwardingChannel
All Implemented Interfaces:
com.maverick.ssh.components.SshComponent

public class VTunBoundForwardingChannel
extends VTunForwardingChannel


Nested Class Summary
 
Nested classes/interfaces inherited from class com.maverick.sshd.Channel
Channel.QueuedData
 
Field Summary
 
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
VTunBoundForwardingChannel()
           
 
Method Summary
 void close()
          This method closes the channel and free's its resources.
protected  void onChannelBind()
          Completes the local-remote connection by sending the channel open confirmation message to the local forwarding client.
protected  byte[] openChannel(byte[] requestdata)
          Called when the channel is being opened.
 
Methods inherited from class com.maverick.sshd.vtun.VTunForwardingChannel
bind, createChannel, evaluateWindowSpace, onChannelClosed, onChannelClosing, onChannelData, onChannelFree, onChannelOpen, onChannelOpenConfirmation, onChannelOpenFailure, onChannelRequest, onExtendedData, onLocalEOF, onRemoteEOF
 
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, canClose, getConnection, getContext, getLocalId, getLocalPacket, getLocalWindow, getName, getQueueSize, getRemoteId, getRemotePacket, getRemoteWindow, getSessionIdentifier, hasQueuedData, idle, isClosed, isClosing, isEOF, isLocalEOF, isOpen, isRemoteEOF, onRemoteClose, onWindowAdjust, queueSize, registerExtendedData, removeEventListener, sendChannelData, sendChannelData, sendChannelRequest, sendEOF, sendExtendedData, sendRequestResponse, sendWindowAdjust
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VTunBoundForwardingChannel

public VTunBoundForwardingChannel()
Method Detail

close

public void close()
Description copied from class: Channel
This method closes the channel and free's its resources.

Overrides:
close in class Channel

onChannelBind

protected void onChannelBind()
Completes the local-remote connection by sending the channel open confirmation message to the local forwarding client.

Specified by:
onChannelBind in class VTunForwardingChannel

openChannel

protected byte[] openChannel(byte[] requestdata)
                      throws WriteOperationRequest,
                             com.maverick.ssh.common.ChannelOpenException

Called when the channel is being opened.

Check the remote forwardings for a listener on the requested port and start the connection process if found. If not found the channel is denied.

Overrides:
openChannel in class VTunForwardingChannel
Parameters:
requestdata - the channel open request data (contains host information etc)
Returns:
any data that should be returned to the client.
Throws:
WriteOperationRequest - allows us to perform asynchronous opening on the channel
com.maverick.ssh.common.ChannelOpenException - if the channel should not be opened.


Copyright © 2012. All Rights Reserved.