protected static class AbstractSession.PendingWriteFuture extends DefaultSshFuture<IoWriteFuture> implements IoWriteFuture, SshFutureListener<IoWriteFuture>
Modifier | Constructor and Description |
---|---|
protected |
AbstractSession.PendingWriteFuture(Buffer buffer) |
Modifier and Type | Method and Description |
---|---|
Buffer |
getBuffer() |
Throwable |
getException()
Returns the cause of the write failure if and only if the write
operation has failed due to an
Exception . |
boolean |
isWritten()
Returns true if the write operation is finished successfully.
|
void |
operationComplete(IoWriteFuture future)
Invoked when the operation associated with the
SshFuture
has been completed even if you add the listener after the completion. |
void |
setException(Throwable cause)
Sets the cause of the write failure, and notifies all threads waiting
for this future.
|
void |
setWritten()
Sets the message is written, and notifies all threads waiting for
this future.
|
addListener, await, await, await, awaitUninterruptibly, awaitUninterruptibly, awaitUninterruptibly, cancel, getValue, isCanceled, isDone, removeListener, setValue
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addListener, await, await, await, awaitUninterruptibly, awaitUninterruptibly, awaitUninterruptibly, isDone, removeListener
protected AbstractSession.PendingWriteFuture(Buffer buffer)
public Buffer getBuffer()
public boolean isWritten()
IoWriteFuture
isWritten
in interface IoWriteFuture
public Throwable getException()
IoWriteFuture
Exception
. Otherwise,
null is returned.getException
in interface IoWriteFuture
public void setWritten()
IoWriteFuture
setWritten
in interface IoWriteFuture
public void setException(Throwable cause)
IoWriteFuture
setException
in interface IoWriteFuture
public void operationComplete(IoWriteFuture future)
SshFutureListener
SshFuture
has been completed even if you add the listener after the completion.operationComplete
in interface SshFutureListener<IoWriteFuture>
future
- The source SshFuture
which called this
callback.Copyright © 2008-2014 The Apache Software Foundation. All Rights Reserved.