com.maverick.sshd
Class LocalForwardingChannel
java.lang.Object
com.maverick.sshd.Channel
com.maverick.sshd.ForwardingChannel
com.maverick.sshd.SocketForwardingChannel
com.maverick.sshd.LocalForwardingChannel
- All Implemented Interfaces:
- ClientConnector, SelectorRegistrationListener, SocketHandler
public class LocalForwardingChannel
- extends SocketForwardingChannel
- implements ClientConnector
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
|
Method Summary |
protected byte[] |
createChannel()
Create the forwarding channel. |
boolean |
finishConnect(java.nio.channels.SelectionKey key)
Called when the forwarded socket has been connected. |
protected void |
onChannelOpenConfirmation()
Called when the channel has been confirmed as open. |
protected void |
onRegistrationComplete()
Called when the forwarded sockets selector has been registered with a
com,maverick.nio.SelectorThread. |
protected byte[] |
openChannel(byte[] requestdata)
Open a forwarding channel. |
| Methods inherited from class com.maverick.sshd.SocketForwardingChannel |
canClose, evaluateClosure, evaluateWindowSpace, getInterestedOps, initialize, onChannelClosed, onChannelClosing, onChannelData, onChannelFree, onChannelOpen, onChannelRequest, onExtendedData, onLocalEOF, onRemoteClose, onRemoteEOF, processReadEvent, processWriteEvent, registrationCompleted, setThread, shutdownSocket |
| Methods inherited from class com.maverick.sshd.Channel |
addEventListener, addInputListener, addOutputListener, close, getChannelType, getConnection, getContext, getLocalId, getLocalPacket, getLocalWindow, getQueueSize, getRemoteId, getRemotePacket, getRemoteWindow, getSessionIdentifier, hasQueuedData, isClosed, isClosing, isEOF, isOpen, onChannelOpenFailure, onWindowAdjust, 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 |
LocalForwardingChannel
public LocalForwardingChannel()
- Constructs a forwarding channel of the type "direct-tcpip"
createChannel
protected byte[] createChannel()
- Create the forwarding channel.
- Specified by:
createChannel in class SocketForwardingChannel
- Returns:
- byte[]
openChannel
protected byte[] openChannel(byte[] requestdata)
throws WriteOperationRequest,
ChannelOpenException
- Open a forwarding channel.
- Specified by:
openChannel in class SocketForwardingChannel
- Parameters:
requestdata - byte[]
- Returns:
- byte[]
- Throws:
WriteOperationRequest
ChannelOpenException
onRegistrationComplete
protected void onRegistrationComplete()
- Called when the forwarded sockets selector has been registered with a
com,maverick.nio.SelectorThread.
- Specified by:
onRegistrationComplete in class SocketForwardingChannel
finishConnect
public boolean finishConnect(java.nio.channels.SelectionKey key)
- Called when the forwarded socket has been connected.
- Specified by:
finishConnect in interface ClientConnector
- Parameters:
key - SelectionKey
- Returns:
- boolean
onChannelOpenConfirmation
protected void onChannelOpenConfirmation()
- Called when the channel has been confirmed as open.
- Specified by:
onChannelOpenConfirmation in class SocketForwardingChannel
Copyright © 2003-2004 3SP LTD. All Rights Reserved.