org.apache.mina.core.write

## Interface WriteRequestQueue

-     public interface WriteRequestQueue

  Stores `WriteRequest`s which are queued to an `IoSession`.
  Author:
    Apache MINA Project

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `clear(IoSession session)` Removes all the requests from this session's queue.
    `void` | `dispose(IoSession session)` Disposes any releases associated with the specified session.
    `boolean` | `isEmpty(IoSession session)` Tells if the WriteRequest queue is empty or not for a session
    `void` | `offer(IoSession session, WriteRequest writeRequest)` Add a new WriteRequest to the session write's queue
    `WriteRequest` | `poll(IoSession session)` Get the first request available in the queue for a session.
    `int` | `size()` Returns the number of objects currently stored in the queue.

- - ### Method Detail

    - #### poll

          WriteRequest poll(IoSession session)

      Get the first request available in the queue for a session.
      Parameters:
        `session` - The session
      Returns:
        The first available request, if any.

    - #### offer

          void offer(IoSession session,
                   WriteRequest writeRequest)

      Add a new WriteRequest to the session write's queue
      Parameters:
        `session` - The session
        `writeRequest` - The writeRequest to add

    - #### isEmpty

          boolean isEmpty(IoSession session)

      Tells if the WriteRequest queue is empty or not for a session
      Parameters:
        `session` - The session to check
      Returns:
        `true` if the writeRequest is empty

    - #### clear

          void clear(IoSession session)

      Removes all the requests from this session's queue.
      Parameters:
        `session` - The associated session

    - #### dispose

          void dispose(IoSession session)

      Disposes any releases associated with the specified session. This method is invoked on disconnection.
      Parameters:
        `session` - The associated session

    - #### size

          int size()

      Returns the number of objects currently stored in the queue.
      Returns:

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