org.apache.mina.handler.multiton

## Interface SingleSessionIoHandler

- All Known Implementing Classes:
    SingleSessionIoHandlerAdapter

  Deprecated.

      @Deprecated
      public interface SingleSessionIoHandler

  A session handler without an `IoSession` parameter for simplicity.

  A `SingleSessionIoHandler` is similar to an `IoHandler` with the notable difference that a `SingleSessionIoHandler` is used only by one session at a time. Thus, there is no `IoSession` parameter in the methods of this interface.

  Because events are passed to the session in order, it is possible to store conversational state as instance variables in this object.

  WARNING: This class is badly named as the actual `IoHandler` implementor is in fact the `SingleSessionIoHandlerDelegate`.
  Author:
    Apache MINA Project

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `exceptionCaught(Throwable cause)` Deprecated. Invoked when any exception is thrown by user `IoHandler` implementation or by MINA.
    `void` | `messageReceived(Object message)` Deprecated. Invoked when protocol message is received.
    `void` | `messageSent(Object message)` Deprecated. Invoked when protocol message that user requested by `IoSession.write(Object)` is sent out actually.
    `void` | `sessionClosed()` Deprecated. Invoked when the connection is closed.
    `void` | `sessionCreated()` Deprecated. Invoked when the session is created.
    `void` | `sessionIdle(IdleStatus status)` Deprecated. Invoked when the connection is idle.
    `void` | `sessionOpened()` Deprecated. Invoked when the connection is opened.

- - ### Method Detail

    - #### sessionCreated

          void sessionCreated()
                              throws Exception

      Deprecated.
      Invoked when the session is created. Initialize default socket parameters and user-defined attributes here.
      Throws:
        `Exception`
      See Also:
        `IoHandler.sessionCreated(IoSession)`

    - #### sessionOpened

          void sessionOpened()
                             throws Exception

      Deprecated.
      Invoked when the connection is opened. This method is not invoked if the transport type is UDP.
      Throws:
        `Exception`
      See Also:
        `IoHandler.sessionOpened(IoSession)`

    - #### sessionClosed

          void sessionClosed()
                             throws Exception

      Deprecated.
      Invoked when the connection is closed. This method is not invoked if the transport type is UDP.
      Throws:
        `Exception`
      See Also:
        `IoHandler.sessionClosed(IoSession)`

    - #### sessionIdle

          void sessionIdle(IdleStatus status)
                           throws Exception

      Deprecated.
      Invoked when the connection is idle. Refer to `IdleStatus`. This method is not invoked if the transport type is UDP.
      Parameters:
        `status` - the type of idleness
      Throws:
        `Exception`
      See Also:
        `IoHandler.sessionIdle(IoSession, IdleStatus)`

    - #### exceptionCaught

          void exceptionCaught(Throwable cause)
                               throws Exception

      Deprecated.
      Invoked when any exception is thrown by user `IoHandler` implementation or by MINA. If `cause` is instanceof `IOException`, MINA will close the connection automatically.
      Parameters:
        `cause` - the caught exception
      Throws:
        `Exception`
      See Also:
        `IoHandler.exceptionCaught(IoSession, Throwable)`

    - #### messageReceived

          void messageReceived(Object message)
                               throws Exception

      Deprecated.
      Invoked when protocol message is received. Implement your protocol flow here.
      Parameters:
        `message` - the received message
      Throws:
        `Exception`
      See Also:
        `IoHandler.messageReceived(IoSession, Object)`

    - #### messageSent

          void messageSent(Object message)
                           throws Exception

      Deprecated.
      Invoked when protocol message that user requested by `IoSession.write(Object)` is sent out actually.
      Parameters:
        `message` - the sent message
      Throws:
        `Exception`
      See Also:
        `IoHandler.messageSent(IoSession, Object)`

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