Class ExceptionMonitor
java.lang.Object
org.apache.mina.util.ExceptionMonitor
- Direct Known Subclasses:
DefaultExceptionMonitor
Monitors uncaught exceptions.
exceptionCaught(Throwable) is
invoked when there are any uncaught exceptions.
You can monitor any uncaught exceptions by setting ExceptionMonitor
by calling setInstance(ExceptionMonitor). The default
monitor logs all caught exceptions in WARN level using
SLF4J.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidexceptionCaught(Throwable cause) Invoked when there are any uncaught exceptions.static ExceptionMonitorstatic voidsetInstance(ExceptionMonitor monitor) Sets the uncaught exception monitor.
-
Field Details
-
instance
-
-
Constructor Details
-
ExceptionMonitor
public ExceptionMonitor()
-
-
Method Details
-
getInstance
- Returns:
- the current exception monitor.
-
setInstance
Sets the uncaught exception monitor. Ifnullis specified, the default monitor will be set.- Parameters:
monitor- A new instance ofDefaultExceptionMonitoris set ifnullis specified.
-
exceptionCaught
Invoked when there are any uncaught exceptions.- Parameters:
cause- The caught exception
-