public class LocalForwardingChannel<T extends SshContext> extends SocketForwardingChannel<T> implements ClientConnector
ChannelNG.ChannelInputStreamkey, LOCAL_FORWARDING_CHANNEL_TYPE, REMOTE_FORWARDING_CHANNEL_TYPE, selectorThread, socketChannel, X11_FORWARDING_CHANNEL_TYPEhostToConnect, originatingHost, originatingPort, portToConnectcache, con, connection, localWindow, remoteWindow| Constructor and Description |
|---|
LocalForwardingChannel(java.lang.String channelType,
SshConnection con) |
LocalForwardingChannel(java.lang.String channelType,
SshConnection con,
java.lang.String addressToBind,
int portToBind,
java.nio.channels.SocketChannel socketChannel)
Constructs a forwarding channel of the type "forwarded-tcpip"
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
checkPermissions() |
protected byte[] |
createChannel()
Create the forwarding channel.
|
boolean |
finishConnect(java.nio.channels.SelectionKey key)
Called when the forwarded socket has been connected.
|
void |
initialize(ProtocolEngine engine,
SshEngine daemon,
java.nio.channels.SelectableChannel channel)
Initialise this socket with a
ProtocolEngine and the current
SshEngine. |
protected void |
onChannelOpenConfirmation()
Called when the channel has been confirmed as open.
|
protected void |
onChannelOpenFailure()
Either nothing was listening on the clients end of the tunnel, or the
connection was rejected.
|
protected void |
onConnectionComplete() |
protected void |
onConnectionError(java.io.IOException ex) |
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.
|
addTask, canClose, cleanupSocket, createCache, evaluateClosure, evaluateWindowSpace, getInitialOps, getName, getSelectorThread, initialize, onChannelClosed, onChannelClosing, onChannelData, onChannelFree, onChannelOpen, onChannelRequest, onExtendedData, onLocalEOF, onRemoteClose, onRemoteEOF, processReadEvent, processWriteEvent, registrationCompleted, setSelectionKey, setThread, shutdownSocket, wantsRead, wantsWritecheckWindowSpace, getHost, getOriginatingHost, getOriginatingPort, getPortaddEventListener, clearIdleState, close, close, evaluateWindowSpace, getChannelType, getCloseFuture, getConnection, getConnectionProtocol, getContext, getInputStream, getLastActivity, getLocalId, getLocalPacket, getLocalWindow, getMaxiumRemotePacketSize, getMaxiumRemoteWindowSize, getOpenFuture, getOutputStream, getRemoteId, getRemotePacket, getRemoteWindow, getSessionIdentifier, getTimeout, haltIncomingData, isClosed, isClosing, isConnected, isIncomingDataHalted, isLocalEOF, isOpen, isRemoteEOF, log, log, log, logMessage, onChannelError, onWindowAdjust, processChannelRequestResponse, registerExtendedDataType, resetIdleState, resumeIncomingData, sendChannelDataAndBlock, sendChannelDataAndBlock, sendChannelDataAndBlock, sendChannelDataAndBlock, sendChannelDataAndBlock, sendChannelDataAndBlock, sendChannelRequest, sendChannelRequest, sendData, sendEOF, sendExtendedData, sendExtendedData, sendRequestResponse, sendWindowAdjust, sendWindowAdjust, setTimeoutclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitregistrationCompletedgetConnection, getContextpublic LocalForwardingChannel(java.lang.String channelType,
SshConnection con)
public LocalForwardingChannel(java.lang.String channelType,
SshConnection con,
java.lang.String addressToBind,
int portToBind,
java.nio.channels.SocketChannel socketChannel)
addressToBind - StringportToBind - intsocketChannel - SocketChannelprotected byte[] createChannel()
throws java.io.IOException
createChannel in class SocketForwardingChannel<T extends SshContext>java.io.IOExceptionprotected byte[] openChannel(byte[] requestdata)
throws WriteOperationRequest,
ChannelOpenException
openChannel in class SocketForwardingChannel<T extends SshContext>requestdata - byte[]WriteOperationRequestChannelOpenExceptionprotected boolean checkPermissions()
protected void onRegistrationComplete()
com,maverick.nio.SelectorThread.onRegistrationComplete in class SocketForwardingChannel<T extends SshContext>public boolean finishConnect(java.nio.channels.SelectionKey key)
finishConnect in interface ClientConnectorkey - SelectionKeyprotected void onConnectionError(java.io.IOException ex)
protected void onConnectionComplete()
protected void onChannelOpenConfirmation()
onChannelOpenConfirmation in class SocketForwardingChannel<T extends SshContext>protected void onChannelOpenFailure()
onChannelOpenFailure in class ChannelNG<T extends SshContext>public void initialize(ProtocolEngine engine, SshEngine daemon, java.nio.channels.SelectableChannel channel)
SocketHandlerProtocolEngine and the current
SshEngine.initialize in interface SocketHandlerengine - ProtocolEnginedaemon - DaemonCopyright © 2021. All rights reserved.