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).

Version:
$Rev: 671827 $, $Date: 2008-06-26 10:49:48 +0200 (jeu, 26 jun 2008) $
Author:
The Apache MINA Project (dev@mina.apache.org)

Field Summary
static ExceptionHandler<Throwable> CLOSE
          A ExceptionHandler that closes the session immediately.
static ExceptionHandler<Throwable> NOOP
          A ExceptionHandler that does nothing.
 
Method Summary
 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-2008 Apache MINA Project. All Rights Reserved.