
public class DefaultChannelGroupFuture extends Object implements ChannelGroupFuture
ChannelGroupFuture implementation.| Constructor and Description |
|---|
DefaultChannelGroupFuture(ChannelGroup group,
Collection<ChannelFuture> futures)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(ChannelGroupFutureListener listener)
Adds the specified listener to this future.
|
ChannelGroupFuture |
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,
TimeUnit unit)
Waits for this future to be completed within the
specified time limit.
|
ChannelGroupFuture |
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,
TimeUnit unit)
Waits for this future to be completed within the
specified time limit without interruption.
|
ChannelFuture |
find(Channel channel)
Returns the
ChannelFuture of the individual I/O operation which
is associated with the specified Channel. |
ChannelFuture |
find(Integer channelId)
Returns the
ChannelFuture of the individual I/O operation which
is associated with the Channel whose ID matches the specified
integer. |
ChannelGroup |
getGroup()
Returns the
ChannelGroup which is associated with this future. |
boolean |
isCompleteFailure()
Returns
true if and only if all I/O operations associated with
this future have failed without any success. |
boolean |
isCompleteSuccess()
Returns
true if and only if all I/O operations associated with
this future were successful without any failure. |
boolean |
isDone()
Returns
true if and only if this future is
complete, regardless of whether the operation was successful, failed,
or canceled. |
boolean |
isPartialFailure()
Returns
true if and only if the I/O operations associated with
this future have failed partially with some success. |
boolean |
isPartialSuccess()
Returns
true if and only if the I/O operations associated with
this future were partially successful with some failure. |
Iterator<ChannelFuture> |
iterator()
Returns the
Iterator that enumerates all ChannelFutures
which are associated with this future. |
void |
removeListener(ChannelGroupFutureListener listener)
Removes the specified listener from this future.
|
public DefaultChannelGroupFuture(ChannelGroup group, Collection<ChannelFuture> futures)
public ChannelGroup getGroup()
ChannelGroupFutureChannelGroup which is associated with this future.getGroup in interface ChannelGroupFuturepublic ChannelFuture find(Integer channelId)
ChannelGroupFutureChannelFuture of the individual I/O operation which
is associated with the Channel whose ID matches the specified
integer.find in interface ChannelGroupFutureChannelFuture if found.
null otherwise.public ChannelFuture find(Channel channel)
ChannelGroupFutureChannelFuture of the individual I/O operation which
is associated with the specified Channel.find in interface ChannelGroupFutureChannelFuture if found.
null otherwise.public Iterator<ChannelFuture> iterator()
ChannelGroupFutureIterator that enumerates all ChannelFutures
which are associated with this future. Please note that the returned
Iterator is is unmodifiable, which means a ChannelFuture
cannot be removed from this future.iterator in interface Iterable<ChannelFuture>iterator in interface ChannelGroupFuturepublic boolean isDone()
ChannelGroupFuturetrue if and only if this future is
complete, regardless of whether the operation was successful, failed,
or canceled.isDone in interface ChannelGroupFuturepublic boolean isCompleteSuccess()
ChannelGroupFuturetrue if and only if all I/O operations associated with
this future were successful without any failure.isCompleteSuccess in interface ChannelGroupFuturepublic boolean isPartialSuccess()
ChannelGroupFuturetrue if and only if the I/O operations associated with
this future were partially successful with some failure.isPartialSuccess in interface ChannelGroupFuturepublic boolean isPartialFailure()
ChannelGroupFuturetrue if and only if the I/O operations associated with
this future have failed partially with some success.isPartialFailure in interface ChannelGroupFuturepublic boolean isCompleteFailure()
ChannelGroupFuturetrue if and only if all I/O operations associated with
this future have failed without any success.isCompleteFailure in interface ChannelGroupFuturepublic void addListener(ChannelGroupFutureListener listener)
ChannelGroupFutureaddListener in interface ChannelGroupFuturepublic void removeListener(ChannelGroupFutureListener listener)
ChannelGroupFutureremoveListener in interface ChannelGroupFuturepublic ChannelGroupFuture await() throws InterruptedException
ChannelGroupFutureawait in interface ChannelGroupFutureInterruptedException - if the current thread was interruptedpublic boolean await(long timeout,
TimeUnit unit)
throws InterruptedException
ChannelGroupFutureawait in interface ChannelGroupFuturetrue if and only if the future was completed within
the specified time limitInterruptedException - if the current thread was interruptedpublic boolean await(long timeoutMillis)
throws InterruptedException
ChannelGroupFutureawait in interface ChannelGroupFuturetrue if and only if the future was completed within
the specified time limitInterruptedException - if the current thread was interruptedpublic ChannelGroupFuture awaitUninterruptibly()
ChannelGroupFutureInterruptedException and
discards it silently.awaitUninterruptibly in interface ChannelGroupFuturepublic boolean awaitUninterruptibly(long timeout,
TimeUnit unit)
ChannelGroupFutureInterruptedException and discards it silently.awaitUninterruptibly in interface ChannelGroupFuturetrue if and only if the future was completed within
the specified time limitpublic boolean awaitUninterruptibly(long timeoutMillis)
ChannelGroupFutureInterruptedException and discards it silently.awaitUninterruptibly in interface ChannelGroupFuturetrue if and only if the future was completed within
the specified time limitCopyright © 2008-2014 The Netty Project. All Rights Reserved.