Package org.apache.sshd.common.io
Interface IoReadFuture
-
- All Superinterfaces:
SshFuture<IoReadFuture>
,VerifiableFuture<IoReadFuture>
,WaitableFuture
- All Known Implementing Classes:
ChannelAsyncInputStream.IoReadFutureImpl
public interface IoReadFuture extends SshFuture<IoReadFuture>, VerifiableFuture<IoReadFuture>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Buffer
getBuffer()
Retrieves the buffer data was read into.java.lang.Throwable
getException()
Returns the cause of the read failure.int
getRead()
Retrieves the number of bytes read.-
Methods inherited from interface org.apache.sshd.common.future.SshFuture
addListener, removeListener
-
Methods inherited from interface org.apache.sshd.common.future.VerifiableFuture
verify, verify, verify, verify
-
Methods inherited from interface org.apache.sshd.common.future.WaitableFuture
await, await, await, await, awaitUninterruptibly, awaitUninterruptibly, awaitUninterruptibly, awaitUninterruptibly, getId, isDone
-
-
-
-
Method Detail
-
getBuffer
Buffer getBuffer()
Retrieves the buffer data was read into.- Returns:
- the buffer,
null
ifWaitableFuture.isDone()
== false
-
getRead
int getRead()
Retrieves the number of bytes read.- Returns:
- The number of bytes read, or -1 if the source of the read has been exhausted (is at EOF), or zero if the
read is not done yet (
WaitableFuture.isDone()
== false
)
-
getException
java.lang.Throwable getException()
Returns the cause of the read failure. AnEOFException
indicates that nothing was read because the source of the read is exhausted.- Returns:
null
if the read operation is not finished yet, or if the read attempt is successful (useWaitableFuture.isDone()
to distinguish between the two).
-
-