org.apache.mina.handler.demux

## Interface ExceptionHandler<E extends Throwable>

-     public interface ExceptionHandler<E extends Throwable>

  A handler interface that `DemuxingIoHandler` forwards `exceptionCaught` events to. You have to register your handler with the type of exception you want to get notified using `DemuxingIoHandler.addExceptionHandler(Class, ExceptionHandler)`.
  Author:
    Apache MINA Project

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static ExceptionHandler<Throwable>` | `CLOSE` A `ExceptionHandler` that closes the session immediately.
    `static ExceptionHandler<Throwable>` | `NOOP` A `ExceptionHandler` that does nothing.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `exceptionCaught(IoSession session, E cause)` Invoked when the specific type of exception is caught from the specified `session`.

- - ### Field Detail

    - #### NOOP

          static final ExceptionHandler<Throwable> NOOP

      A `ExceptionHandler` that does nothing. This is useful when you want to ignore an exception of a specific type silently.

    - #### CLOSE

          static final ExceptionHandler<Throwable> CLOSE

      A `ExceptionHandler` that closes the session immediately. This is useful when you want to close the session when an exception of a specific type is raised.

  - ### Method Detail

    - #### exceptionCaught

          void exceptionCaught(IoSession session,
                             E cause)
                               throws Exception

      Invoked when the specific type of exception is caught from the specified `session`.
      Throws:
        `Exception`

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