Class ChannelAsyncInputStream
java.lang.Object
org.apache.sshd.common.util.logging.AbstractLoggingBean
org.apache.sshd.common.util.closeable.IoBaseCloseable
org.apache.sshd.common.util.closeable.AbstractCloseable
org.apache.sshd.common.channel.ChannelAsyncInputStream
- All Implemented Interfaces:
Closeable, AutoCloseable, Channel, ChannelHolder, Closeable, IoInputStream
public class ChannelAsyncInputStream
extends AbstractCloseable
implements IoInputStream, ChannelHolder
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class AbstractCloseable
AbstractCloseable.State -
Field Summary
FieldsFields inherited from class AbstractCloseable
closeFuture, futureLock, stateFields inherited from class AbstractLoggingBean
log -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected CloseFutureprivate voiddoRead(boolean resume) protected voidpreClose()preClose is guaranteed to be called before doCloseGracefully or doCloseImmediately.NOTE: the buffer must not be touched until the returned read future is completed.toString()voidMethods inherited from class AbstractCloseable
addCloseFutureListener, builder, close, doCloseImmediately, getFutureLock, isClosed, isClosing, removeCloseFutureListenerMethods inherited from class AbstractLoggingBean
debug, debug, debug, debug, debug, error, error, error, error, error, getSimplifiedLogger, info, info, warn, warn, warn, warn, warn, warn, warn, warnMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Closeable
addCloseFutureListener, close, close, isClosed, isClosing, isOpen, removeCloseFutureListener
-
Field Details
-
channelInstance
-
buffer
-
readFutureId
-
pending
-
-
Constructor Details
-
ChannelAsyncInputStream
-
-
Method Details
-
getChannel
- Specified by:
getChannelin interfaceChannelHolder- Returns:
- The associated
Channelinstance
-
write
- Throws:
IOException
-
read
Description copied from interface:IoInputStreamNOTE: the buffer must not be touched until the returned read future is completed.- Specified by:
readin interfaceIoInputStream- Parameters:
buf- theBufferto use- Returns:
- The
IoReadFuturefor the operation
-
preClose
protected void preClose()Description copied from class:AbstractCloseablepreClose is guaranteed to be called before doCloseGracefully or doCloseImmediately. When preClose() is called, isClosing() == true- Overrides:
preClosein classAbstractCloseable
-
doCloseGracefully
- Overrides:
doCloseGracefullyin classAbstractCloseable
-
doRead
private void doRead(boolean resume) -
toString
-