public final class IoUtil
extends java.lang.Object
限定符和类型 | 方法和说明 |
---|---|
static void |
await(java.lang.Iterable<? extends IoFuture> futures) |
static boolean |
await(java.lang.Iterable<? extends IoFuture> futures,
long timeoutMillis) |
static boolean |
await(java.lang.Iterable<? extends IoFuture> futures,
long timeout,
java.util.concurrent.TimeUnit unit) |
static void |
awaitUninterruptably(java.lang.Iterable<? extends IoFuture> futures) |
static boolean |
awaitUninterruptibly(java.lang.Iterable<? extends IoFuture> futures,
long timeoutMillis) |
static boolean |
awaitUninterruptibly(java.lang.Iterable<? extends IoFuture> futures,
long timeout,
java.util.concurrent.TimeUnit unit) |
static java.util.List<WriteFuture> |
broadcast(java.lang.Object message,
java.util.Collection<IoSession> sessions)
Writes the specified
message to the specified sessions . |
static java.util.List<WriteFuture> |
broadcast(java.lang.Object message,
IoSession... sessions)
Writes the specified
message to the specified sessions . |
static java.util.List<WriteFuture> |
broadcast(java.lang.Object message,
java.lang.Iterable<IoSession> sessions)
Writes the specified
message to the specified sessions . |
static java.util.List<WriteFuture> |
broadcast(java.lang.Object message,
java.util.Iterator<IoSession> sessions)
Writes the specified
message to the specified sessions . |
public static java.util.List<WriteFuture> broadcast(java.lang.Object message, java.util.Collection<IoSession> sessions)
message
to the specified sessions
.
If the specified message
is an IoBuffer
, the buffer is
automatically duplicated using IoBuffer.duplicate()
.message
- The message to broadcastsessions
- The sessions that will receive the messagepublic static java.util.List<WriteFuture> broadcast(java.lang.Object message, java.lang.Iterable<IoSession> sessions)
message
to the specified sessions
.
If the specified message
is an IoBuffer
, the buffer is
automatically duplicated using IoBuffer.duplicate()
.message
- The message to broadcastsessions
- The sessions that will receive the messagepublic static java.util.List<WriteFuture> broadcast(java.lang.Object message, java.util.Iterator<IoSession> sessions)
message
to the specified sessions
.
If the specified message
is an IoBuffer
, the buffer is
automatically duplicated using IoBuffer.duplicate()
.message
- The message to writesessions
- The sessions the message has to be written toWriteFuture
for the written messagespublic static java.util.List<WriteFuture> broadcast(java.lang.Object message, IoSession... sessions)
message
to the specified sessions
.
If the specified message
is an IoBuffer
, the buffer is
automatically duplicated using IoBuffer.duplicate()
.message
- The message to writesessions
- The sessions the message has to be written toWriteFuture
for the written messagespublic static void await(java.lang.Iterable<? extends IoFuture> futures) throws java.lang.InterruptedException
java.lang.InterruptedException
public static void awaitUninterruptably(java.lang.Iterable<? extends IoFuture> futures)
public static boolean await(java.lang.Iterable<? extends IoFuture> futures, long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException
java.lang.InterruptedException
public static boolean await(java.lang.Iterable<? extends IoFuture> futures, long timeoutMillis) throws java.lang.InterruptedException
java.lang.InterruptedException
public static boolean awaitUninterruptibly(java.lang.Iterable<? extends IoFuture> futures, long timeout, java.util.concurrent.TimeUnit unit)
public static boolean awaitUninterruptibly(java.lang.Iterable<? extends IoFuture> futures, long timeoutMillis)