Package org.apache.mina.handler.demux
Interface ExceptionHandler<E extends Throwable>
-
- Type Parameters:
E
- The exception type
public interface ExceptionHandler<E extends Throwable>
A handler interface thatDemuxingIoHandler
forwardsexceptionCaught
events to. You have to register your handler with the type of exception you want to get notified usingDemuxingIoHandler.addExceptionHandler(Class, ExceptionHandler)
.- Author:
- Apache MINA Project
-
-
Field Summary
Fields Modifier and Type Field Description static ExceptionHandler<Throwable>
CLOSE
AExceptionHandler
that closes the session immediately.static ExceptionHandler<Throwable>
NOOP
AExceptionHandler
that does nothing.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
exceptionCaught(IoSession session, E cause)
Invoked when the specific type of exception is caught from the specifiedsession
.
-
-
-
Field Detail
-
NOOP
static final ExceptionHandler<Throwable> NOOP
AExceptionHandler
that does nothing. This is useful when you want to ignore an exception of a specific type silently.
-
CLOSE
static final ExceptionHandler<Throwable> CLOSE
AExceptionHandler
that closes the session immediately. This is useful when you want to close the session when an exception of a specific type is raised.
-
-