Interface ExceptionHandler<E extends Throwable>
- Type Parameters:
E- The exception type
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).-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ExceptionHandler<Throwable> AExceptionHandlerthat closes the session immediately.static final ExceptionHandler<Throwable> AExceptionHandlerthat does nothing. -
Method Summary
Modifier and TypeMethodDescriptionvoidexceptionCaught(IoSession session, E cause) Invoked when the specific type of exception is caught from the specifiedsession.
-
Field Details
-
NOOP
AExceptionHandlerthat does nothing. This is useful when you want to ignore an exception of a specific type silently. -
CLOSE
AExceptionHandlerthat closes the session immediately. This is useful when you want to close the session when an exception of a specific type is raised.
-
-
Method Details
-
exceptionCaught
-