Package com.sshtools.synergy.ssh
Class ForwardingChannel<T extends SshContext>
java.lang.Object
com.sshtools.synergy.ssh.ChannelNG<T>
com.sshtools.synergy.ssh.ForwardingChannel<T>
- All Implemented Interfaces:
Channel
- Direct Known Subclasses:
SocketForwardingChannel
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.-
Nested Class Summary
Nested classes/interfaces inherited from class com.sshtools.synergy.ssh.ChannelNG
ChannelNG.ChannelInputStream -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected StringTunnel endpoint hostnameprotected StringTunnel startpoint hostnameprotected intTunnel startpoint port numberprotected intTunnel endpoint port numberFields inherited from class com.sshtools.synergy.ssh.ChannelNG
cache, con, connection, localWindow, remoteWindow -
Constructor Summary
ConstructorsConstructorDescriptionForwardingChannel(String channelType, int maximumPacketSize, com.sshtools.common.util.UnsignedInteger32 initialWindowSize, com.sshtools.common.util.UnsignedInteger32 maximumWindowSpace, com.sshtools.common.util.UnsignedInteger32 minimumWindowSpace) Construct the forwarding channel.ForwardingChannel(String channelType, int maximumPacketSize, com.sshtools.common.util.UnsignedInteger32 initialWindowSize, com.sshtools.common.util.UnsignedInteger32 maximumWindowSpace, com.sshtools.common.util.UnsignedInteger32 minimumWindowSpace, boolean autoConsume) -
Method Summary
Methods inherited from class com.sshtools.synergy.ssh.ChannelNG
addEventListener, canClose, checkWindowSpace, clearIdleState, close, close, close, createCache, createChannel, disposeCache, evaluateWindowSpace, getChannelType, getCloseFuture, getConnection, getConnectionProtocol, getContext, getInputStream, getLastActivity, getLocalId, getLocalPacket, getLocalWindow, getMaxiumRemotePacketSize, getMaxiumRemoteWindowSize, getOpenFuture, getOutputStream, getRemoteId, getRemotePacket, getRemoteWindow, getSessionIdentifier, getTimeout, haltIncomingData, isAutoConsume, isClosed, isClosing, isConnected, isIncomingDataHalted, isLocalEOF, isOpen, isRemoteEOF, log, log, log, log, logMessage, 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, setTimeout
-
Field Details
-
hostToConnect
Tunnel endpoint hostname -
portToConnect
protected int portToConnectTunnel endpoint port number -
originatingHost
Tunnel startpoint hostname -
originatingPort
protected int originatingPortTunnel startpoint port number
-
-
Constructor Details
-
ForwardingChannel
public ForwardingChannel(String channelType, int maximumPacketSize, com.sshtools.common.util.UnsignedInteger32 initialWindowSize, com.sshtools.common.util.UnsignedInteger32 maximumWindowSpace, com.sshtools.common.util.UnsignedInteger32 minimumWindowSpace) Construct the forwarding channel.- Parameters:
channelType- StringmaximumPacket- intwindowSize- int- See Also:
-
com.sshtools.synergy.ssh.ChannelNG#Channel(String channelType, int maximumPacketSize, int initialWindowSize)
-
ForwardingChannel
public ForwardingChannel(String channelType, int maximumPacketSize, com.sshtools.common.util.UnsignedInteger32 initialWindowSize, com.sshtools.common.util.UnsignedInteger32 maximumWindowSpace, com.sshtools.common.util.UnsignedInteger32 minimumWindowSpace, boolean autoConsume)
-
-
Method Details
-
getHost
The hostname of the endpoint of tunnel.- Returns:
- String
-
getPort
public int getPort()The port number of the endpoint of tunnel.- Returns:
- int
-
getOriginatingHost
The hostname of the startpoint of tunnel.- Returns:
- String
-
getOriginatingPort
public int getOriginatingPort()The port number of the startpoint of tunnel.- Returns:
- int
-