Package com.sshtools.j2ssh.forwarding
Class ForwardingIOChannel
java.lang.Object
com.sshtools.j2ssh.connection.Channel
com.sshtools.j2ssh.connection.IOChannel
com.sshtools.j2ssh.forwarding.ForwardingIOChannel
- All Implemented Interfaces:
ForwardingChannel
- Version:
- $Revision: 1.13 $
- Author:
- $author$
-
Field Summary
Fields inherited from class com.sshtools.j2ssh.connection.IOChannel
boundInputStream, boundOutputStream, in, ios, out
Fields inherited from class com.sshtools.j2ssh.connection.Channel
connection, localChannelId, localPacketSize, localWindow, remoteChannelId, remotePacketSize, remoteWindow, state
Fields inherited from interface com.sshtools.j2ssh.forwarding.ForwardingChannel
LOCAL_FORWARDING_CHANNEL, REMOTE_FORWARDING_CHANNEL, X11_FORWARDING_CHANNEL
-
Constructor Summary
ConstructorsConstructorDescriptionForwardingIOChannel
(String forwardType, String name, String hostToConnectOrBind, int portToConnectOrBind, String originatingHost, int originatingPort) Creates a new ForwardingIOChannel object. -
Method Summary
Modifier and TypeMethodDescriptionbyte[]
byte[]
protected int
protected int
protected int
getName()
int
int
protected void
protected void
onChannelRequest
(String request, boolean wantReply, byte[] requestData) Methods inherited from class com.sshtools.j2ssh.connection.IOChannel
bindInputStream, bindOutputStream, getInputStream, getOutputStream, init, onChannelClose, onChannelData, onChannelEOF, onChannelExtData, open, setLocalEOF
Methods inherited from class com.sshtools.j2ssh.connection.Channel
addEventListener, close, finalizeClose, getLocalChannelId, getLocalPacketSize, getLocalWindow, getRemoteChannelId, getRemotePacketSize, getRemoteWindow, getState, init, isClosed, isLocalEOF, isOpen, isRemoteEOF, processChannelData, processChannelData, remoteClose, sendChannelData, sendChannelExtData, setName, setRemoteEOF
-
Constructor Details
-
ForwardingIOChannel
public ForwardingIOChannel(String forwardType, String name, String hostToConnectOrBind, int portToConnectOrBind, String originatingHost, int originatingPort) throws ForwardingConfigurationException Creates a new ForwardingIOChannel object.- Parameters:
forwardType
-hostToConnectOrBind
-portToConnectOrBind
-originatingHost
-originatingPort
-- Throws:
ForwardingConfigurationException
-
-
Method Details
-
getChannelOpenData
public byte[] getChannelOpenData()- Specified by:
getChannelOpenData
in classChannel
- Returns:
-
getChannelConfirmationData
public byte[] getChannelConfirmationData()- Specified by:
getChannelConfirmationData
in classChannel
- Returns:
-
getName
- Specified by:
getName
in interfaceForwardingChannel
- Overrides:
getName
in classChannel
-
getChannelType
- Specified by:
getChannelType
in interfaceForwardingChannel
- Specified by:
getChannelType
in classChannel
- Returns:
-
getMinimumWindowSpace
protected int getMinimumWindowSpace()- Specified by:
getMinimumWindowSpace
in classChannel
- Returns:
-
getMaximumWindowSpace
protected int getMaximumWindowSpace()- Specified by:
getMaximumWindowSpace
in classChannel
- Returns:
-
getMaximumPacketSize
protected int getMaximumPacketSize()- Specified by:
getMaximumPacketSize
in classChannel
- Returns:
-
getOriginatingHost
- Specified by:
getOriginatingHost
in interfaceForwardingChannel
- Returns:
-
getOriginatingPort
public int getOriginatingPort()- Specified by:
getOriginatingPort
in interfaceForwardingChannel
- Returns:
-
getHostToConnectOrBind
- Specified by:
getHostToConnectOrBind
in interfaceForwardingChannel
- Returns:
-
getPortToConnectOrBind
public int getPortToConnectOrBind()- Specified by:
getPortToConnectOrBind
in interfaceForwardingChannel
- Returns:
-
onChannelRequest
protected void onChannelRequest(String request, boolean wantReply, byte[] requestData) throws IOException - Specified by:
onChannelRequest
in classChannel
- Parameters:
request
-wantReply
-requestData
-- Throws:
IOException
-
onChannelOpen
- Specified by:
onChannelOpen
in classChannel
- Throws:
IOException
-