org.apache.mina.api

## Class AbstractIoHandler

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

- All Implemented Interfaces:
    IoHandler

      public abstract class AbstractIoHandler
      extends Object
      implements IoHandler

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

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractIoHandler()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `exceptionCaught(IoSession session, Exception cause)` Invoked when any runtime exception is thrown during session processing (filters, unexpected error, etc..).
    `void` | `messageReceived(IoSession session, Object message)` 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` | `serviceActivated(IoService service)` Invoked when a new service is activated by an `IoService`.
    `void` | `serviceInactivated(IoService service)` Invoked when a service is inactivated by an `IoService`.
    `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

    - #### AbstractIoHandler

          public AbstractIoHandler()

  - ### Method Detail

    - #### sessionOpened

          public void sessionOpened(IoSession session)

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

    - #### sessionClosed

          public void sessionClosed(IoSession session)

      Invoked when a connection is closed.
      Specified by:
        `sessionClosed` in interface `IoHandler`
      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 `IoHandler`
      Parameters:
        `session` - `IoSession` associated with the invocation

    - #### messageReceived

          public void messageReceived(IoSession session,
                             Object message)

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

    - #### 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 `IoHandler`
      Parameters:
        `session` - `IoSession` associated with the invocation
        `message` - the incoming message to process

    - #### serviceActivated

          public void serviceActivated(IoService service)

      Invoked when a new service is activated by an `IoService`.
      Specified by:
        `serviceActivated` in interface `IoHandler`
      Parameters:
        `service` - the `IoService`

    - #### serviceInactivated

          public void serviceInactivated(IoService service)

      Invoked when a service is inactivated by an `IoService`.
      Specified by:
        `serviceInactivated` in interface `IoHandler`
      Parameters:
        `service` - the `IoService`

    - #### exceptionCaught

          public void exceptionCaught(IoSession session,
                             Exception cause)

      Invoked when any runtime exception is thrown during session processing (filters, unexpected error, etc..).
      Specified by:
        `exceptionCaught` in interface `IoHandler`
      Parameters:
        `session` - the session related to the exception
        `cause` - the caught exception

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