public abstract class ForwardingChannel extends Channel
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.Channel.DataBlock, Channel.QueuedData
Modifier and Type | Field and Description |
---|---|
protected String |
hostToConnect
Tunnel endpoint hostname
|
protected String |
originatingHost
Tunnel startpoint hostname
|
protected int |
originatingPort
Tunnel startpoint port number
|
protected int |
portToConnect
Tunnel endpoint port number
|
connection, localwindow, localWindowLock
Constructor and Description |
---|
ForwardingChannel(String channelType,
int maximumPacketSize,
int initialWindowSize)
Construct the forwarding channel.
|
Modifier and Type | Method and Description |
---|---|
String |
getHost()
The hostname of the endpoint of tunnel.
|
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, addInputListener, addOutputListener, canClose, clearIdleState, close, close, consumeWindowSpace, createChannel, createCloseTask, evaluateWindowSpace, executeTask, getChannelType, getConnection, getContext, getLocalId, getLocalPacket, getLocalWindow, getQueueSize, getRemoteId, getRemotePacket, getRemoteWindow, getSessionIdentifier, isClosed, isClosing, isEOF, isOpen, isSelfManagedWindowSpace, markEOF, onChannelClosed, onChannelClosing, onChannelData, onChannelFree, onChannelOpen, onChannelOpenConfirmation, onChannelOpenFailure, onChannelRequest, onExtendedData, onLocalEOF, onRemoteClose, onRemoteEOF, onWindowAdjust, openChannel, queueSize, registerExtendedData, resetIdleState, sendChannelData, sendChannelData, sendChannelData, sendChannelData, sendChannelDataAndBlock, sendChannelRequest, sendEOF, sendExtendedData, sendExtendedData, sendRequestResponse, sendWindowAdjust
protected String hostToConnect
protected int portToConnect
protected String originatingHost
protected int originatingPort
public ForwardingChannel(String channelType, int maximumPacketSize, int initialWindowSize)
channelType
- StringmaximumPacket
- intwindowSize
- intChannel.Channel(String channelType, int maximumPacketSize, int initialWindowSize)
public String getHost()
public int getPort()
public String getOriginatingHost()
public int getOriginatingPort()
Copyright © 2024. All rights reserved.