|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.netty.channel.CompleteChannelFuture
public abstract class CompleteChannelFuture
A skeletal ChannelFuture implementation which represents a
ChannelFuture which has been completed already.
| Constructor Summary | |
|---|---|
protected |
CompleteChannelFuture(Channel channel)
Creates a new instance. |
| Method Summary | |
|---|---|
void |
addListener(ChannelFutureListener listener)
Adds the specified listener to this future. |
ChannelFuture |
await()
Waits for this future to be completed. |
boolean |
await(long timeoutMillis)
Waits for this future to be completed within the specified time limit. |
boolean |
await(long timeout,
java.util.concurrent.TimeUnit unit)
Waits for this future to be completed within the specified time limit. |
ChannelFuture |
awaitUninterruptibly()
Waits for this future to be completed without interruption. |
boolean |
awaitUninterruptibly(long timeoutMillis)
Waits for this future to be completed within the specified time limit without interruption. |
boolean |
awaitUninterruptibly(long timeout,
java.util.concurrent.TimeUnit unit)
Waits for this future to be completed within the specified time limit without interruption. |
boolean |
cancel()
Cancels the I/O operation associated with this future and notifies all listeners if canceled successfully. |
Channel |
getChannel()
Returns a channel where the I/O operation associated with this future takes place. |
boolean |
isCancelled()
Returns true if and only if this future was
cancelled by a ChannelFuture.cancel() method. |
boolean |
isDone()
Returns true if and only if this future is
complete, regardless of whether the operation was successful, failed,
or cancelled. |
void |
removeListener(ChannelFutureListener listener)
Removes the specified listener from this future. |
boolean |
setFailure(java.lang.Throwable cause)
Marks this future as a failure and notifies all listeners. |
boolean |
setProgress(long amount,
long current,
long total)
Notifies the progress of the operation to the listeners that implements ChannelFutureProgressListener. |
boolean |
setSuccess()
Marks this future as a success and notifies all listeners. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.jboss.netty.channel.ChannelFuture |
|---|
getCause, isSuccess |
| Constructor Detail |
|---|
protected CompleteChannelFuture(Channel channel)
channel - the Channel associated with this future| Method Detail |
|---|
public void addListener(ChannelFutureListener listener)
ChannelFuture
addListener in interface ChannelFuturepublic void removeListener(ChannelFutureListener listener)
ChannelFuture
removeListener in interface ChannelFuture
public ChannelFuture await()
throws java.lang.InterruptedException
ChannelFuture
await in interface ChannelFuturejava.lang.InterruptedException - if the current thread was interrupted
public boolean await(long timeout,
java.util.concurrent.TimeUnit unit)
throws java.lang.InterruptedException
ChannelFuture
await in interface ChannelFuturetrue if and only if the future was completed within
the specified time limit
java.lang.InterruptedException - if the current thread was interrupted
public boolean await(long timeoutMillis)
throws java.lang.InterruptedException
ChannelFuture
await in interface ChannelFuturetrue if and only if the future was completed within
the specified time limit
java.lang.InterruptedException - if the current thread was interruptedpublic ChannelFuture awaitUninterruptibly()
ChannelFutureInterruptedException and
discards it silently.
awaitUninterruptibly in interface ChannelFuture
public boolean awaitUninterruptibly(long timeout,
java.util.concurrent.TimeUnit unit)
ChannelFutureInterruptedException and discards it silently.
awaitUninterruptibly in interface ChannelFuturetrue if and only if the future was completed within
the specified time limitpublic boolean awaitUninterruptibly(long timeoutMillis)
ChannelFutureInterruptedException and discards it silently.
awaitUninterruptibly in interface ChannelFuturetrue if and only if the future was completed within
the specified time limitpublic Channel getChannel()
ChannelFuture
getChannel in interface ChannelFuturepublic boolean isDone()
ChannelFuturetrue if and only if this future is
complete, regardless of whether the operation was successful, failed,
or cancelled.
isDone in interface ChannelFuture
public boolean setProgress(long amount,
long current,
long total)
ChannelFutureChannelFutureProgressListener. Please note that this method will
not do anything and return false if this future is complete
already.
setProgress in interface ChannelFuturetrue if and only if notification was made.public boolean setFailure(java.lang.Throwable cause)
ChannelFuture
setFailure in interface ChannelFuturetrue if and only if successfully marked this future as
a failure. Otherwise false because this future is
already marked as either a success or a failure.public boolean setSuccess()
ChannelFuture
setSuccess in interface ChannelFuturetrue if and only if successfully marked this future as
a success. Otherwise false because this future is
already marked as either a success or a failure.public boolean cancel()
ChannelFuture
cancel in interface ChannelFuturetrue if and only if the operation has been canceled.
false if the operation can't be canceled or is already
completed.public boolean isCancelled()
ChannelFuturetrue if and only if this future was
cancelled by a ChannelFuture.cancel() method.
isCancelled in interface ChannelFuture
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||