Package com.sshtools.j2ssh.forwarding
Class ForwardingSocketChannel
- java.lang.Object
-
- com.sshtools.j2ssh.connection.Channel
-
- com.sshtools.j2ssh.connection.SocketChannel
-
- com.sshtools.j2ssh.forwarding.ForwardingSocketChannel
-
- All Implemented Interfaces:
ForwardingChannel
public class ForwardingSocketChannel extends SocketChannel implements ForwardingChannel
- Version:
- $Revision: 1.13 $
- Author:
- $author$
-
-
Field Summary
-
Fields inherited from class com.sshtools.j2ssh.connection.SocketChannel
socket
-
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
Constructors Constructor Description ForwardingSocketChannel(java.lang.String forwardType, java.lang.String name, java.lang.String hostToConnectOrBind, int portToConnectOrBind, java.lang.String originatingHost, int originatingPort)Creates a new ForwardingSocketChannel object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]getChannelConfirmationData()byte[]getChannelOpenData()java.lang.StringgetChannelType()java.lang.StringgetHostToConnectOrBind()protected intgetMaximumPacketSize()protected intgetMaximumWindowSpace()protected intgetMinimumWindowSpace()java.lang.StringgetName()java.lang.StringgetOriginatingHost()intgetOriginatingPort()intgetPortToConnectOrBind()protected voidonChannelRequest(java.lang.String request, boolean wantReply, byte[] requestData)-
Methods inherited from class com.sshtools.j2ssh.connection.SocketChannel
bindSocket, onChannelClose, onChannelData, onChannelEOF, onChannelExtData, onChannelOpen
-
Methods inherited from class com.sshtools.j2ssh.connection.Channel
addEventListener, close, finalizeClose, getLocalChannelId, getLocalPacketSize, getLocalWindow, getRemoteChannelId, getRemotePacketSize, getRemoteWindow, getState, init, init, isClosed, isLocalEOF, isOpen, isRemoteEOF, open, processChannelData, processChannelData, remoteClose, sendChannelData, sendChannelExtData, setLocalEOF, setName, setRemoteEOF
-
-
-
-
Constructor Detail
-
ForwardingSocketChannel
public ForwardingSocketChannel(java.lang.String forwardType, java.lang.String name, java.lang.String hostToConnectOrBind, int portToConnectOrBind, java.lang.String originatingHost, int originatingPort) throws ForwardingConfigurationExceptionCreates a new ForwardingSocketChannel object.- Parameters:
forwardType-hostToConnectOrBind-portToConnectOrBind-originatingHost-originatingPort-- Throws:
ForwardingConfigurationException
-
-
Method Detail
-
getName
public java.lang.String getName()
- Specified by:
getNamein interfaceForwardingChannel- Overrides:
getNamein classChannel
-
getChannelOpenData
public byte[] getChannelOpenData()
- Specified by:
getChannelOpenDatain classChannel- Returns:
-
getChannelConfirmationData
public byte[] getChannelConfirmationData()
- Specified by:
getChannelConfirmationDatain classChannel- Returns:
-
getChannelType
public java.lang.String getChannelType()
- Specified by:
getChannelTypein interfaceForwardingChannel- Specified by:
getChannelTypein classChannel- Returns:
-
getMinimumWindowSpace
protected int getMinimumWindowSpace()
- Specified by:
getMinimumWindowSpacein classChannel- Returns:
-
getMaximumWindowSpace
protected int getMaximumWindowSpace()
- Specified by:
getMaximumWindowSpacein classChannel- Returns:
-
getMaximumPacketSize
protected int getMaximumPacketSize()
- Specified by:
getMaximumPacketSizein classChannel- Returns:
-
getOriginatingHost
public java.lang.String getOriginatingHost()
- Specified by:
getOriginatingHostin interfaceForwardingChannel- Returns:
-
getOriginatingPort
public int getOriginatingPort()
- Specified by:
getOriginatingPortin interfaceForwardingChannel- Returns:
-
getHostToConnectOrBind
public java.lang.String getHostToConnectOrBind()
- Specified by:
getHostToConnectOrBindin interfaceForwardingChannel- Returns:
-
getPortToConnectOrBind
public int getPortToConnectOrBind()
- Specified by:
getPortToConnectOrBindin interfaceForwardingChannel- Returns:
-
onChannelRequest
protected void onChannelRequest(java.lang.String request, boolean wantReply, byte[] requestData) throws java.io.IOException- Specified by:
onChannelRequestin classChannel- Parameters:
request-wantReply-requestData-- Throws:
java.io.IOException
-
-