net.schmizz.sshj.connection.channel.forwarded
Class AbstractForwardedChannel
java.lang.Object
net.schmizz.sshj.connection.channel.AbstractChannel
net.schmizz.sshj.connection.channel.forwarded.AbstractForwardedChannel
- All Implemented Interfaces:
- Closeable, ErrorNotifiable, SSHPacketHandler, Channel, Channel.Forwarded
- Direct Known Subclasses:
- RemotePortForwarder.ForwardedTCPIPChannel, X11Forwarder.X11Channel
public abstract class AbstractForwardedChannel
- extends AbstractChannel
- implements Channel.Forwarded
Base class for forwarded channels whose open is initiated by the server.
Methods inherited from class net.schmizz.sshj.connection.channel.AbstractChannel |
close, closeAllStreams, eofInputStreams, finishOff, getAutoExpand, getID, getInputStream, getLocalMaxPacketSize, getLocalWinSize, getOutputStream, getRecipient, getRemoteMaxPacketSize, getRemoteWinSize, getType, gotExtendedData, gotUnknown, handle, handleRequest, init, isOpen, join, join, newBuffer, notifyError, receiveInto, sendChannelRequest, sendClose, sendEOF, setAutoExpand, toString |
Methods inherited from interface net.schmizz.sshj.connection.channel.Channel |
close, getAutoExpand, getID, getInputStream, getLocalMaxPacketSize, getLocalWinSize, getOutputStream, getRecipient, getRemoteMaxPacketSize, getRemoteWinSize, getType, isOpen, join, join, sendEOF, setAutoExpand |
origIP
protected final String origIP
origPort
protected final int origPort
AbstractForwardedChannel
protected AbstractForwardedChannel(Connection conn,
String type,
int recipient,
long remoteWinSize,
long remoteMaxPacketSize,
String origIP,
int origPort)
confirm
public void confirm()
throws TransportException
- Description copied from interface:
Channel.Forwarded
- Confirm
CHANNEL_OPEN
request.
- Specified by:
confirm
in interface Channel.Forwarded
- Throws:
TransportException
- error sending confirmation packet
reject
public void reject(OpenFailException.Reason reason,
String message)
throws TransportException
- Description copied from interface:
Channel.Forwarded
- Indicate rejection to remote end.
- Specified by:
reject
in interface Channel.Forwarded
- Parameters:
reason
- indicate reason
for rejection of the requestmessage
- indicate a message for why the request is rejected
- Throws:
TransportException
- error sending rejection packet
getOriginatorIP
public String getOriginatorIP()
- Specified by:
getOriginatorIP
in interface Channel.Forwarded
- Returns:
- the IP of where the forwarded connection originates.
getOriginatorPort
public int getOriginatorPort()
- Specified by:
getOriginatorPort
in interface Channel.Forwarded
- Returns:
- port from which the forwarded connection originates.
Copyright © 2009-2012. All Rights Reserved.