public interface ExceptionHandler<E extends java.lang.Throwable>
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)
.限定符和类型 | 字段和说明 |
---|---|
static ExceptionHandler<java.lang.Throwable> |
CLOSE
A
ExceptionHandler that closes the session immediately. |
static ExceptionHandler<java.lang.Throwable> |
NOOP
A
ExceptionHandler that does nothing. |
限定符和类型 | 方法和说明 |
---|---|
void |
exceptionCaught(IoSession session,
E cause)
Invoked when the specific type of exception is caught from the
specified
session . |
static final ExceptionHandler<java.lang.Throwable> NOOP
ExceptionHandler
that does nothing. This is useful when
you want to ignore an exception of a specific type silently.static final ExceptionHandler<java.lang.Throwable> CLOSE
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.