org.apache.mina.api

## Class AbstractIoFilter

- java.lang.Object
- - org.apache.mina.api.AbstractIoFilter

- All Implemented Interfaces:
    IoFilter
  Direct Known Subclasses:
    ProtocolCodecFilter, RequestFilter

      public abstract class AbstractIoFilter
      extends Object
      implements IoFilter

  A convenient `IoFilter` implementation to be sub-classed for easier IoFilter implementation.
  Author:
    Apache MINA Project

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractIoFilter()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `messageReceived(IoSession session, Object message, ReadFilterChainController controller)` Invoked when a message is received.
    `void` | `messageSent(IoSession session, Object message)` Invoked when a high level message was written to the low level O/S buffer.
    `void` | `messageWriting(IoSession session, WriteRequest message, WriteFilterChainController controller)` Invoked when a message is under writing.
    `void` | `sessionClosed(IoSession session)` Invoked when a connection is closed.
    `void` | `sessionIdle(IoSession session, IdleStatus status)` Invoked with the related `IdleStatus` when a connection becomes idle.
    `void` | `sessionOpened(IoSession session)` Invoked when a connection has been opened.

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

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

- - ### Constructor Detail

    - #### AbstractIoFilter

          public AbstractIoFilter()

  - ### Method Detail

    - #### sessionOpened

          public void sessionOpened(IoSession session)

      Invoked when a connection has been opened.
      Specified by:
        `sessionOpened` in interface `IoFilter`
      Parameters:
        `session` - `IoSession` associated with the invocation

    - #### sessionClosed

          public void sessionClosed(IoSession session)

      Invoked when a connection is closed.
      Specified by:
        `sessionClosed` in interface `IoFilter`
      Parameters:
        `session` - `IoSession` associated with the invocation

    - #### sessionIdle

          public void sessionIdle(IoSession session,
                         IdleStatus status)

      Invoked with the related `IdleStatus` when a connection becomes idle.
      Specified by:
        `sessionIdle` in interface `IoFilter`
      Parameters:
        `session` - `IoSession` associated with the invocation

    - #### messageReceived

          public void messageReceived(IoSession session,
                             Object message,
                             ReadFilterChainController controller)

      Invoked when a message is received.
      Specified by:
        `messageReceived` in interface `IoFilter`
      Parameters:
        `session` - `IoSession` associated with the invocation
        `message` - the incoming message to process

    - #### messageWriting

          public void messageWriting(IoSession session,
                            WriteRequest message,
                            WriteFilterChainController controller)

      Invoked when a message is under writing. The filter is supposed to apply the needed transformation.
      Specified by:
        `messageWriting` in interface `IoFilter`
      Parameters:
        `session` - `IoSession` associated with the invocation
        `message` - the message to process before writing

    - #### messageSent

          public void messageSent(IoSession session,
                         Object message)

      Invoked when a high level message was written to the low level O/S buffer.
      Specified by:
        `messageSent` in interface `IoFilter`
      Parameters:
        `session` - `IoSession` associated with the invocation
        `message` - the incoming message to process

Copyright © 2009–2013 Apache MINA Project. All rights reserved.