org.apache.mina.core

## Class IoUtil

- java.lang.Object
- - org.apache.mina.core.IoUtil

-     public class IoUtil
      extends Object

  A utility class that provides various convenience methods related with `IoSession` and `IoFuture`.
  Author:
    Apache MINA Project

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `await(Iterable<? extends IoFuture> futures)`
    `static boolean` | `await(Iterable<? extends IoFuture> futures, long timeoutMillis)`
    `static boolean` | `await(Iterable<? extends IoFuture> futures, long timeout, TimeUnit unit)`
    `static void` | `awaitUninterruptably(Iterable<? extends IoFuture> futures)`
    `static boolean` | `awaitUninterruptibly(Iterable<? extends IoFuture> futures, long timeoutMillis)`
    `static boolean` | `awaitUninterruptibly(Iterable<? extends IoFuture> futures, long timeout, TimeUnit unit)`
    `static List<WriteFuture>` | `broadcast(Object message, Collection<IoSession> sessions)` Writes the specified `message` to the specified `sessions`.
    `static List<WriteFuture>` | `broadcast(Object message, IoSession... sessions)` Writes the specified `message` to the specified `sessions`.
    `static List<WriteFuture>` | `broadcast(Object message, Iterable<IoSession> sessions)` Writes the specified `message` to the specified `sessions`.
    `static List<WriteFuture>` | `broadcast(Object message, Iterator<IoSession> sessions)` Writes the specified `message` to the specified `sessions`.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### broadcast

          public static List<WriteFuture> broadcast(Object message,
                                    Collection<IoSession> sessions)

      Writes the specified `message` to the specified `sessions`. If the specified `message` is an `IoBuffer`, the buffer is automatically duplicated using `IoBuffer.duplicate()`.

    - #### broadcast

          public static List<WriteFuture> broadcast(Object message,
                                    Iterable<IoSession> sessions)

      Writes the specified `message` to the specified `sessions`. If the specified `message` is an `IoBuffer`, the buffer is automatically duplicated using `IoBuffer.duplicate()`.

    - #### broadcast

          public static List<WriteFuture> broadcast(Object message,
                                    Iterator<IoSession> sessions)

      Writes the specified `message` to the specified `sessions`. If the specified `message` is an `IoBuffer`, the buffer is automatically duplicated using `IoBuffer.duplicate()`.

    - #### broadcast

          public static List<WriteFuture> broadcast(Object message,
                                    IoSession... sessions)

      Writes the specified `message` to the specified `sessions`. If the specified `message` is an `IoBuffer`, the buffer is automatically duplicated using `IoBuffer.duplicate()`.

    - #### await

          public static void await(Iterable<? extends IoFuture> futures)
                            throws InterruptedException

      Throws:
        `InterruptedException`

    - #### awaitUninterruptably

          public static void awaitUninterruptably(Iterable<? extends IoFuture> futures)

    - #### await

          public static boolean await(Iterable<? extends IoFuture> futures,
                      long timeout,
                      TimeUnit unit)
                               throws InterruptedException

      Throws:
        `InterruptedException`

    - #### await

          public static boolean await(Iterable<? extends IoFuture> futures,
                      long timeoutMillis)
                               throws InterruptedException

      Throws:
        `InterruptedException`

    - #### awaitUninterruptibly

          public static boolean awaitUninterruptibly(Iterable<? extends IoFuture> futures,
                                     long timeout,
                                     TimeUnit unit)

    - #### awaitUninterruptibly

          public static boolean awaitUninterruptibly(Iterable<? extends IoFuture> futures,
                                     long timeoutMillis)

Copyright © 2004-2012 Apache MINA Project. All Rights Reserved.