org.apache.mina.handler.multiton

## Class SingleSessionIoHandlerDelegate

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

- All Implemented Interfaces:
    IoHandler

  Deprecated.

      @Deprecated
      public class SingleSessionIoHandlerDelegate
      extends Object
      implements IoHandler

  An `IoHandler` implementation which delegates all requests to `SingleSessionIoHandler`s. A `SingleSessionIoHandlerFactory` is used to create a new `SingleSessionIoHandler` for each newly created session. WARNING : This `IoHandler` implementation may be easier to understand and thus to use but the user should be aware that creating one handler by session will lower scalability if building an high performance server. This should only be used with very specific needs in mind.
  Author:
    Apache MINA Project

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static AttributeKey` | `HANDLER` Deprecated. The key used to store the `SingleSessionIoHandler` as a session attribute.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SingleSessionIoHandlerDelegate(SingleSessionIoHandlerFactory factory)` Deprecated. Creates a new instance that uses the passed in `SingleSessionIoHandlerFactory` to create new `SingleSessionIoHandler`s.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `exceptionCaught(IoSession session, Throwable cause)` Deprecated. Delegates the method call to the `SingleSessionIoHandler.exceptionCaught(Throwable)` method of the handler assigned to this session.
    `SingleSessionIoHandlerFactory` | `getFactory()` Deprecated. Returns the `SingleSessionIoHandlerFactory` that is used to create a new `SingleSessionIoHandler` instance.
    `void` | `messageReceived(IoSession session, Object message)` Deprecated. Delegates the method call to the `SingleSessionIoHandler.messageReceived(Object)` method of the handler assigned to this session.
    `void` | `messageSent(IoSession session, Object message)` Deprecated. Delegates the method call to the `SingleSessionIoHandler.messageSent(Object)` method of the handler assigned to this session.
    `void` | `sessionClosed(IoSession session)` Deprecated. Delegates the method call to the `SingleSessionIoHandler.sessionClosed()` method of the handler assigned to this session.
    `void` | `sessionCreated(IoSession session)` Deprecated. Creates a new instance with the factory passed to the constructor of this class.
    `void` | `sessionIdle(IoSession session, IdleStatus status)` Deprecated. Delegates the method call to the `SingleSessionIoHandler.sessionIdle(IdleStatus)` method of the handler assigned to this session.
    `void` | `sessionOpened(IoSession session)` Deprecated. Delegates the method call to the `SingleSessionIoHandler.sessionOpened()` method of the handler assigned to this session.

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

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

- - ### Field Detail

    - #### HANDLER

          public static final AttributeKey HANDLER

      Deprecated.
      The key used to store the `SingleSessionIoHandler` as a session attribute.

  - ### Constructor Detail

    - #### SingleSessionIoHandlerDelegate

          public SingleSessionIoHandlerDelegate(SingleSessionIoHandlerFactory factory)

      Deprecated.
      Creates a new instance that uses the passed in `SingleSessionIoHandlerFactory` to create new `SingleSessionIoHandler`s.
      Parameters:
        `factory` - the factory for `SingleSessionIoHandler`s

  - ### Method Detail

    - #### getFactory

          public SingleSessionIoHandlerFactory getFactory()

      Deprecated.
      Returns the `SingleSessionIoHandlerFactory` that is used to create a new `SingleSessionIoHandler` instance.

    - #### sessionCreated

          public void sessionCreated(IoSession session)
                              throws Exception

      Deprecated.
      Creates a new instance with the factory passed to the constructor of this class. The created handler is stored as a session attribute named `HANDLER`.
      Specified by:
        `sessionCreated` in interface `IoHandler`
      Throws:
        `Exception`
      See Also:
        `IoHandler.sessionCreated(org.apache.mina.core.session.IoSession)`

    - #### sessionOpened

          public void sessionOpened(IoSession session)
                             throws Exception

      Deprecated.
      Delegates the method call to the `SingleSessionIoHandler.sessionOpened()` method of the handler assigned to this session.
      Specified by:
        `sessionOpened` in interface `IoHandler`
      Throws:
        `Exception`

    - #### sessionClosed

          public void sessionClosed(IoSession session)
                             throws Exception

      Deprecated.
      Delegates the method call to the `SingleSessionIoHandler.sessionClosed()` method of the handler assigned to this session.
      Specified by:
        `sessionClosed` in interface `IoHandler`
      Throws:
        `Exception`

    - #### sessionIdle

          public void sessionIdle(IoSession session,
                         IdleStatus status)
                           throws Exception

      Deprecated.
      Delegates the method call to the `SingleSessionIoHandler.sessionIdle(IdleStatus)` method of the handler assigned to this session.
      Specified by:
        `sessionIdle` in interface `IoHandler`
      Throws:
        `Exception`

    - #### exceptionCaught

          public void exceptionCaught(IoSession session,
                             Throwable cause)
                               throws Exception

      Deprecated.
      Delegates the method call to the `SingleSessionIoHandler.exceptionCaught(Throwable)` method of the handler assigned to this session.
      Specified by:
        `exceptionCaught` in interface `IoHandler`
      Throws:
        `Exception`

    - #### messageReceived

          public void messageReceived(IoSession session,
                             Object message)
                               throws Exception

      Deprecated.
      Delegates the method call to the `SingleSessionIoHandler.messageReceived(Object)` method of the handler assigned to this session.
      Specified by:
        `messageReceived` in interface `IoHandler`
      Throws:
        `Exception`

    - #### messageSent

          public void messageSent(IoSession session,
                         Object message)
                           throws Exception

      Deprecated.
      Delegates the method call to the `SingleSessionIoHandler.messageSent(Object)` method of the handler assigned to this session.
      Specified by:
        `messageSent` in interface `IoHandler`
      Throws:
        `Exception`

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