Class AbstractForwardedChannel
java.lang.Object
net.schmizz.sshj.connection.channel.AbstractChannel
net.schmizz.sshj.connection.channel.forwarded.AbstractForwardedChannel
- All Implemented Interfaces:
Closeable,AutoCloseable,ErrorNotifiable,SSHPacketHandler,Channel,Channel.Forwarded
- Direct Known Subclasses:
RemotePortForwarder.ForwardedTCPIPChannel,X11Forwarder.X11Channel
Base class for forwarded channels whose open is initiated by the server.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.schmizz.sshj.connection.channel.AbstractChannel
AbstractChannel.TransportRunnableNested classes/interfaces inherited from interface net.schmizz.sshj.connection.channel.Channel
Channel.Direct, Channel.ForwardedNested classes/interfaces inherited from interface net.schmizz.sshj.common.ErrorNotifiable
ErrorNotifiable.Util -
Field Summary
FieldsFields inherited from class net.schmizz.sshj.connection.channel.AbstractChannel
closeEvent, conn, log, loggerFactory, lwin, openEvent, rwin, trans -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractForwardedChannel(Connection conn, String type, int recipient, long remoteWinSize, long remoteMaxPacketSize, String origIP, int origPort) -
Method Summary
Modifier and TypeMethodDescriptionvoidconfirm()ConfirmCHANNEL_OPENrequest.intvoidreject(OpenFailException.Reason reason, String message) Indicate rejection to remote end.Methods inherited from class net.schmizz.sshj.connection.channel.AbstractChannel
close, closeAllStreams, eofInputStreams, finishOff, getAutoExpand, getID, getInputStream, getLocalMaxPacketSize, getLocalWinSize, getLoggerFactory, getOutputStream, getRecipient, getRemoteCharset, getRemoteMaxPacketSize, getRemoteWinSize, getType, gotExtendedData, gotUnknown, handle, handleRequest, init, isEOF, isOpen, join, join, newBuffer, notifyError, receiveInto, sendChannelRequest, sendClose, setAutoExpand, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.schmizz.sshj.connection.channel.Channel
close, getAutoExpand, getID, getInputStream, getLocalMaxPacketSize, getLocalWinSize, getLoggerFactory, getOutputStream, getRecipient, getRemoteCharset, getRemoteMaxPacketSize, getRemoteWinSize, getType, isEOF, isOpen, join, join, setAutoExpandMethods inherited from interface net.schmizz.sshj.common.ErrorNotifiable
notifyErrorMethods inherited from interface net.schmizz.sshj.common.SSHPacketHandler
handle
-
Field Details
-
origIP
-
origPort
protected final int origPort
-
-
Constructor Details
-
AbstractForwardedChannel
protected AbstractForwardedChannel(Connection conn, String type, int recipient, long remoteWinSize, long remoteMaxPacketSize, String origIP, int origPort)
-
-
Method Details
-
confirm
Description copied from interface:Channel.ForwardedConfirmCHANNEL_OPENrequest.- Specified by:
confirmin interfaceChannel.Forwarded- Throws:
TransportException- error sending confirmation packet
-
reject
Description copied from interface:Channel.ForwardedIndicate rejection to remote end.- Specified by:
rejectin interfaceChannel.Forwarded- Parameters:
reason- indicatereasonfor rejection of the requestmessage- indicate a message for why the request is rejected- Throws:
TransportException- error sending rejection packet
-
getOriginatorIP
- Specified by:
getOriginatorIPin interfaceChannel.Forwarded- Returns:
- the IP of where the forwarded connection originates.
-
getOriginatorPort
public int getOriginatorPort()- Specified by:
getOriginatorPortin interfaceChannel.Forwarded- Returns:
- port from which the forwarded connection originates.
-