Class AbstractDirectChannel
- java.lang.Object
-
- net.schmizz.sshj.connection.channel.AbstractChannel
-
- net.schmizz.sshj.connection.channel.direct.AbstractDirectChannel
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,ErrorNotifiable
,SSHPacketHandler
,Channel
,Channel.Direct
- Direct Known Subclasses:
DirectTCPIPChannel
,SessionChannel
public abstract class AbstractDirectChannel extends AbstractChannel implements Channel.Direct
Base class for direct channels whose open is initiated by the client.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.schmizz.sshj.connection.channel.AbstractChannel
AbstractChannel.TransportRunnable
-
Nested classes/interfaces inherited from interface net.schmizz.sshj.connection.channel.Channel
Channel.Direct, Channel.Forwarded
-
Nested classes/interfaces inherited from interface net.schmizz.sshj.common.ErrorNotifiable
ErrorNotifiable.Util
-
-
Field Summary
-
Fields inherited from class net.schmizz.sshj.connection.channel.AbstractChannel
closeEvent, conn, log, loggerFactory, lwin, openEvent, rwin, trans
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractDirectChannel(Connection conn, java.lang.String type)
protected
AbstractDirectChannel(Connection conn, java.lang.String type, java.nio.charset.Charset remoteCharset)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected SSHPacket
buildOpenReq()
private void
gotOpenConfirmation(SSHPacket buf)
private void
gotOpenFailure(SSHPacket buf)
protected void
gotUnknown(Message cmd, SSHPacket buf)
void
open()
Request opening this channel from 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, handle, handleRequest, init, isEOF, isOpen, join, join, newBuffer, notifyError, receiveInto, sendChannelRequest, sendClose, setAutoExpand, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods 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, setAutoExpand
-
Methods inherited from interface net.schmizz.sshj.common.ErrorNotifiable
notifyError
-
Methods inherited from interface net.schmizz.sshj.common.SSHPacketHandler
handle
-
-
-
-
Constructor Detail
-
AbstractDirectChannel
protected AbstractDirectChannel(Connection conn, java.lang.String type)
-
AbstractDirectChannel
protected AbstractDirectChannel(Connection conn, java.lang.String type, java.nio.charset.Charset remoteCharset)
-
-
Method Detail
-
open
public void open() throws ConnectionException, TransportException
Description copied from interface:Channel.Direct
Request opening this channel from remote end.- Specified by:
open
in interfaceChannel.Direct
- Throws:
OpenFailException
- in case the channel open request was rejectedConnectionException
- other connection-layer errorTransportException
- error writing packets etc.
-
gotOpenConfirmation
private void gotOpenConfirmation(SSHPacket buf) throws ConnectionException
- Throws:
ConnectionException
-
gotOpenFailure
private void gotOpenFailure(SSHPacket buf) throws ConnectionException
- Throws:
ConnectionException
-
buildOpenReq
protected SSHPacket buildOpenReq()
-
gotUnknown
protected void gotUnknown(Message cmd, SSHPacket buf) throws ConnectionException, TransportException
- Overrides:
gotUnknown
in classAbstractChannel
- Throws:
ConnectionException
TransportException
-
-