public class RemoteForwardingChannel<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| Modifier | Constructor and Description |
|---|---|
protected |
RemoteForwardingChannel(SshConnection con) |
|
RemoteForwardingChannel(SshConnection con,
java.lang.String addressToBind,
int portToBind,
java.nio.channels.SocketChannel socketChannel)
Constructs a forwarding channel of the type "forwarded-tcpip"
|
|
RemoteForwardingChannel(java.lang.String name,
SshConnection con,
java.lang.String addressToBind,
int portToBind,
java.nio.channels.SocketChannel socketChannel,
T context) |
| Modifier and Type | Method and Description |
|---|---|
protected byte[] |
createChannel()
Creates the end of the channel open message string address that was
connected uint32 port that was connected string originator IP address
uint32 originator port
|
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 by the remote side -
this method is only called when the channel has been requested by this
side of the connection
|
protected void |
onChannelOpenFailure()
Either nothing was listening on the clients end of the tunnel, or the
connection was rejected.
|
protected void |
onRegistrationComplete()
Called by the subsystem when the selector registration has been completed.
|
protected byte[] |
openChannel(byte[] requestdata)
Called when the channel is being opened.
|
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 RemoteForwardingChannel(SshConnection con, java.lang.String addressToBind, int portToBind, java.nio.channels.SocketChannel socketChannel)
addressToBind - StringportToBind - intsocketChannel - SocketChannelprotected RemoteForwardingChannel(SshConnection con)
public RemoteForwardingChannel(java.lang.String name,
SshConnection con,
java.lang.String addressToBind,
int portToBind,
java.nio.channels.SocketChannel socketChannel,
T context)
name - addressToBind - portToBind - socketChannel - protected byte[] createChannel()
throws java.io.IOException
createChannel in class SocketForwardingChannel<T extends SshContext>java.io.IOExceptionprotected void onRegistrationComplete()
SocketForwardingChannelonRegistrationComplete in class SocketForwardingChannel<T extends SshContext>protected void onChannelOpenConfirmation()
ChannelNGonChannelOpenConfirmation in class SocketForwardingChannel<T extends SshContext>protected byte[] openChannel(byte[] requestdata)
throws WriteOperationRequest,
ChannelOpenException
ChannelNGopenChannel in class SocketForwardingChannel<T extends SshContext>WriteOperationRequestChannelOpenExceptionpublic boolean finishConnect(java.nio.channels.SelectionKey key)
finishConnect in interface ClientConnectorkey - SelectionKeyprotected 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.