Package org.jboss.netty.channel
Class SucceededChannelFuture
- java.lang.Object
-
- org.jboss.netty.channel.CompleteChannelFuture
-
- org.jboss.netty.channel.SucceededChannelFuture
-
- All Implemented Interfaces:
ChannelFuture
public class SucceededChannelFuture extends CompleteChannelFuture
TheCompleteChannelFuture
which is succeeded already. It is recommended to useChannels.succeededFuture(Channel)
instead of calling the constructor of this future.
-
-
Constructor Summary
Constructors Constructor Description SucceededChannelFuture(Channel channel)
Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Throwable
getCause()
Returns the cause of the failed I/O operation if the I/O operation has failed.boolean
isSuccess()
Returnstrue
if and only if the I/O operation was completed successfully.ChannelFuture
sync()
Waits for this future until it is done, and rethrows the cause of the failure if this future failed.ChannelFuture
syncUninterruptibly()
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
-
-
-
-
Method Detail
-
getCause
public Throwable getCause()
Description copied from interface:ChannelFuture
Returns the cause of the failed I/O operation if the I/O operation has failed.- Returns:
- the cause of the failure.
null
if succeeded or this future is not completed yet.
-
isSuccess
public boolean isSuccess()
Description copied from interface:ChannelFuture
Returnstrue
if and only if the I/O operation was completed successfully.
-
sync
public ChannelFuture sync() throws InterruptedException
Description copied from interface:ChannelFuture
Waits 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 newChannelException
before being thrown.- Throws:
InterruptedException
-
syncUninterruptibly
public ChannelFuture syncUninterruptibly()
Description copied from interface:ChannelFuture
Waits 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 newChannelException
before being thrown.
-
-