Package org.jboss.netty.channel
Class SucceededChannelFuture
java.lang.Object
org.jboss.netty.channel.CompleteChannelFuture
org.jboss.netty.channel.SucceededChannelFuture
- All Implemented Interfaces:
ChannelFuture
The
CompleteChannelFuture which is succeeded already. It is
recommended to use Channels.succeededFuture(Channel) instead of
calling the constructor of this future.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetCause()Returns the cause of the failed I/O operation if the I/O operation has failed.booleanReturnstrueif and only if the I/O operation was completed successfully.sync()Waits for this future until it is done, and rethrows the cause of the failure if this future failed.Waits for this future until it is done, and rethrows the cause of the failure if this future failed.Methods inherited from class org.jboss.netty.channel.CompleteChannelFuture
addListener, await, await, await, awaitUninterruptibly, awaitUninterruptibly, awaitUninterruptibly, cancel, getChannel, isCancelled, isDone, removeListener, setFailure, setProgress, setSuccess
-
Constructor Details
-
SucceededChannelFuture
Creates a new instance.- Parameters:
channel- theChannelassociated with this future
-
-
Method Details
-
getCause
Description copied from interface:ChannelFutureReturns the cause of the failed I/O operation if the I/O operation has failed.- Returns:
- the cause of the failure.
nullif succeeded or this future is not completed yet.
-
isSuccess
public boolean isSuccess()Description copied from interface:ChannelFutureReturnstrueif and only if the I/O operation was completed successfully. -
sync
Description copied from interface:ChannelFutureWaits for this future until it is done, and rethrows the cause of the failure if this future failed. If the cause of the failure is a checked exception, it is wrapped with a newChannelExceptionbefore being thrown.- Throws:
InterruptedException
-
syncUninterruptibly
Description copied from interface:ChannelFutureWaits for this future until it is done, and rethrows the cause of the failure if this future failed. If the cause of the failure is a checked exception, it is wrapped with a newChannelExceptionbefore being thrown.
-