public abstract class ForwardingChannel<T extends SshContext> extends ChannelNG<T>
An abstract forwarding channel implementation for use with both local and remote forwarding operations.
A forwarding channel acts as a tunnel, connections are listened for at the tunnel start point and any data is forwarded from the start point through the ssh connection and then onto the end point. Local forwards have the tunnel start point on the client, and the data flows from the start point through the client, along the ssh connection to the server, out to the endpoint which can be anywhere. Remote forwards have the tunnel start point on the Server, and the data flows from the start point through the server, along the ssh connection to the client, out to the endpoint which can be anywhere.ChannelNG.ChannelInputStream| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
hostToConnect
Tunnel endpoint hostname
|
protected java.lang.String |
originatingHost
Tunnel startpoint hostname
|
protected int |
originatingPort
Tunnel startpoint port number
|
protected int |
portToConnect
Tunnel endpoint port number
|
cache, con, connection, localWindow, remoteWindow| Constructor and Description |
|---|
ForwardingChannel(java.lang.String channelType,
int maximumPacketSize,
int initialWindowSize,
int maximumWindowSpace,
int minimumWindowSpace)
Construct the forwarding channel.
|
ForwardingChannel(java.lang.String channelType,
int maximumPacketSize,
int initialWindowSize,
int maximumWindowSpace,
int minimumWindowSpace,
boolean autoConsume) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
checkWindowSpace() |
java.lang.String |
getHost()
The hostname of the endpoint of tunnel.
|
java.lang.String |
getOriginatingHost()
The hostname of the startpoint of tunnel.
|
int |
getOriginatingPort()
The port number of the startpoint of tunnel.
|
int |
getPort()
The port number of the endpoint of tunnel.
|
addEventListener, canClose, clearIdleState, close, close, createCache, createChannel, 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, onChannelClosed, onChannelClosing, onChannelData, onChannelError, onChannelFree, onChannelOpen, onChannelOpenConfirmation, onChannelOpenFailure, onChannelRequest, onExtendedData, onLocalEOF, onRemoteClose, onRemoteEOF, onWindowAdjust, openChannel, processChannelRequestResponse, registerExtendedDataType, resetIdleState, resumeIncomingData, sendChannelDataAndBlock, sendChannelDataAndBlock, sendChannelDataAndBlock, sendChannelDataAndBlock, sendChannelDataAndBlock, sendChannelDataAndBlock, sendChannelRequest, sendChannelRequest, sendData, sendEOF, sendExtendedData, sendExtendedData, sendRequestResponse, sendWindowAdjust, sendWindowAdjust, setTimeoutprotected java.lang.String hostToConnect
protected int portToConnect
protected java.lang.String originatingHost
protected int originatingPort
public ForwardingChannel(java.lang.String channelType,
int maximumPacketSize,
int initialWindowSize,
int maximumWindowSpace,
int minimumWindowSpace)
channelType - StringmaximumPacket - intwindowSize - intcom.sshtools.synergy.ssh.ChannelNG#Channel(String channelType, int maximumPacketSize, int initialWindowSize)public ForwardingChannel(java.lang.String channelType,
int maximumPacketSize,
int initialWindowSize,
int maximumWindowSpace,
int minimumWindowSpace,
boolean autoConsume)
public java.lang.String getHost()
public int getPort()
public java.lang.String getOriginatingHost()
public int getOriginatingPort()
protected boolean checkWindowSpace()
checkWindowSpace in class ChannelNG<T extends SshContext>Copyright © 2021. All rights reserved.