org.apache.mina.example.proxy

## Class AbstractProxyIoHandler

- java.lang.Object
- - org.apache.mina.core.service.IoHandlerAdapter
  - - org.apache.mina.example.proxy.AbstractProxyIoHandler

- All Implemented Interfaces:
    IoHandler
  Direct Known Subclasses:
    ClientToProxyIoHandler, ServerToProxyIoHandler

      public abstract class AbstractProxyIoHandler
      extends IoHandlerAdapter

  Base class of `IoHandler` classes which handle proxied connections.
  Author:
    Apache MINA Project

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `OTHER_IO_SESSION`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractProxyIoHandler()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `messageReceived(IoSession session, Object message)` Invoked when a message is received.
    `void` | `sessionClosed(IoSession session)` Invoked when a connection is closed.
    `void` | `sessionCreated(IoSession session)` Invoked from an I/O processor thread when a new connection has been created.

    - ### Methods inherited from class org.apache.mina.core.service.IoHandlerAdapter

      `exceptionCaught, messageSent, sessionIdle, sessionOpened`

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

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

- - ### Field Detail

    - #### OTHER_IO_SESSION

          public static final String OTHER_IO_SESSION

  - ### Constructor Detail

    - #### AbstractProxyIoHandler

          public AbstractProxyIoHandler()

  - ### Method Detail

    - #### sessionCreated

          public void sessionCreated(IoSession session)
                              throws Exception

      Description copied from interface: `IoHandler`
      Invoked from an I/O processor thread when a new connection has been created. Because this method is supposed to be called from the same thread that handles I/O of multiple sessions, please implement this method to perform tasks that consumes minimal amount of time such as socket parameter and user-defined session attribute initialization.
      Specified by:
        `sessionCreated` in interface `IoHandler`
      Overrides:
        `sessionCreated` in class `IoHandlerAdapter`
      Throws:
        `Exception`

    - #### sessionClosed

          public void sessionClosed(IoSession session)
                             throws Exception

      Description copied from interface: `IoHandler`
      Invoked when a connection is closed.
      Specified by:
        `sessionClosed` in interface `IoHandler`
      Overrides:
        `sessionClosed` in class `IoHandlerAdapter`
      Throws:
        `Exception`

    - #### messageReceived

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

      Description copied from interface: `IoHandler`
      Invoked when a message is received.
      Specified by:
        `messageReceived` in interface `IoHandler`
      Overrides:
        `messageReceived` in class `IoHandlerAdapter`
      Throws:
        `Exception`

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