public class LocalForwardingChannel extends SocketForwardingChannel<SshServerContext> 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.
Channel.QueuedData
Modifier and Type | Field and Description |
---|---|
static String |
CHANNEL_TYPE |
key, selectorThread, socketChannel
hostToConnect, originatingHost, originatingPort, portToConnect
connection, localwindow, localWindowLock
Constructor and Description |
---|
LocalForwardingChannel()
Constructs a forwarding channel of the type "direct-tcpip"
|
Modifier and Type | Method and Description |
---|---|
protected byte[] |
createChannel()
Create the forwarding channel.
|
boolean |
finishConnect(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.
|
canClose, canClose, evaluateClosure, evaluateWindowSpace, getInterestedOps, initialize, onChannelClosed, onChannelClosing, onChannelData, onChannelFree, onChannelOpen, onChannelRequest, onExtendedData, onLocalEOF, onRemoteClose, onRemoteEOF, onWindowAdjust, processReadEvent, processWriteEvent, registrationCompleted, run, setSelectionKey, setThread, shutdownSocket
getHost, getOriginatingHost, getOriginatingPort, getPort
addEventListener, addInputListener, addOutputListener, clearIdleState, close, getChannelType, getConnection, getConnectionProtocol, getContext, getLocalId, getLocalPacket, getLocalWindow, getQueueSize, getRemoteId, getRemotePacket, getRemoteWindow, getSessionIdentifier, isClosed, isClosing, isEOF, isLocalEOF, isOpen, isRemoteEOF, onChannelOpenFailure, processChannelRequestResponse, queueSize, registerExtendedData, resetIdleState, sendChannelData, sendChannelData, sendChannelData, sendChannelData, sendChannelDataAndBlock, sendChannelRequest, sendEOF, sendExtendedData, sendExtendedData, sendRequestResponse, sendWindowAdjust
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
registrationCompleted
public static final String CHANNEL_TYPE
public LocalForwardingChannel()
protected byte[] createChannel()
createChannel
in class SocketForwardingChannel<SshServerContext>
protected byte[] openChannel(byte[] requestdata) throws WriteOperationRequest, ChannelOpenException
openChannel
in class SocketForwardingChannel<SshServerContext>
requestdata
- byte[]WriteOperationRequest
ChannelOpenException
protected void onRegistrationComplete()
com,maverick.nio.SelectorThread
.onRegistrationComplete
in class SocketForwardingChannel<SshServerContext>
public boolean finishConnect(SelectionKey key)
finishConnect
in interface ClientConnector
key
- SelectionKeyprotected void onChannelOpenConfirmation()
onChannelOpenConfirmation
in class SocketForwardingChannel<SshServerContext>
Copyright © 2016. All rights reserved.