org.apache.mina.handler.multiton

## Class SingleSessionIoHandlerAdapter

- java.lang.Object
- - org.apache.mina.handler.multiton.SingleSessionIoHandlerAdapter

- All Implemented Interfaces:
    SingleSessionIoHandler

  Deprecated.

      @Deprecated
      public class SingleSessionIoHandlerAdapter
      extends Object
      implements SingleSessionIoHandler

  Adapter class for implementors of the `SingleSessionIoHandler` interface. The session to which the handler is assigned is accessible through the `getSession()` method.
  Author:
    Apache MINA Project

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SingleSessionIoHandlerAdapter(IoSession session)` Deprecated. Creates a new instance that is assigned to the passed in session.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `exceptionCaught(Throwable th)` Deprecated. Invoked when any exception is thrown by user `IoHandler` implementation or by MINA.
    `protected IoSession` | `getSession()` Deprecated. Retrieves the session to which this handler is assigned.
    `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.

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

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

- - ### Constructor Detail

    - #### SingleSessionIoHandlerAdapter

          public SingleSessionIoHandlerAdapter(IoSession session)

      Deprecated.
      Creates a new instance that is assigned to the passed in session.
      Parameters:
        `session` - the session to which the handler is assigned

  - ### Method Detail

    - #### getSession

          protected IoSession getSession()

      Deprecated.
      Retrieves the session to which this handler is assigned.
      Returns:
        the session

    - #### exceptionCaught

          public void exceptionCaught(Throwable th)
                               throws Exception

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

    - #### messageReceived

          public void messageReceived(Object message)
                               throws Exception

      Deprecated.
      Description copied from interface: `SingleSessionIoHandler`
      Invoked when protocol message is received. Implement your protocol flow here.
      Specified by:
        `messageReceived` in interface `SingleSessionIoHandler`
      Parameters:
        `message` - the received message
      Throws:
        `Exception`
      See Also:
        `IoHandler.messageReceived(IoSession, Object)`

    - #### messageSent

          public void messageSent(Object message)
                           throws Exception

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

    - #### sessionClosed

          public void sessionClosed()
                             throws Exception

      Deprecated.
      Description copied from interface: `SingleSessionIoHandler`
      Invoked when the connection is closed. This method is not invoked if the transport type is UDP.
      Specified by:
        `sessionClosed` in interface `SingleSessionIoHandler`
      Throws:
        `Exception`
      See Also:
        `IoHandler.sessionClosed(IoSession)`

    - #### sessionCreated

          public void sessionCreated()
                              throws Exception

      Deprecated.
      Description copied from interface: `SingleSessionIoHandler`
      Invoked when the session is created. Initialize default socket parameters and user-defined attributes here.
      Specified by:
        `sessionCreated` in interface `SingleSessionIoHandler`
      Throws:
        `Exception`
      See Also:
        `IoHandler.sessionCreated(IoSession)`

    - #### sessionIdle

          public void sessionIdle(IdleStatus status)
                           throws Exception

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

    - #### sessionOpened

          public void sessionOpened()
                             throws Exception

      Deprecated.
      Description copied from interface: `SingleSessionIoHandler`
      Invoked when the connection is opened. This method is not invoked if the transport type is UDP.
      Specified by:
        `sessionOpened` in interface `SingleSessionIoHandler`
      Throws:
        `Exception`
      See Also:
        `IoHandler.sessionOpened(IoSession)`

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