Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.mina.common
Class ExceptionMonitor

    java.lang.Object
      org.apache.mina.common.ExceptionMonitor

    public abstract class ExceptionMonitor

extends Object

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.

Version:
  $Rev: 555855 $, $Date: 2007-07-13 12:19:00 +0900 (Fri, 13 Jul 2007) $
Author:
  The Apache Directory Project (mina-dev@directory.apache.org)
See Also:
  `DefaultExceptionMonitor`

Constructor Summary
`ExceptionMonitor()`

Method Summary
`abstract void` | `exceptionCaught(Throwable cause)` Invoked when there are any uncaught exceptions.
`static ExceptionMonitor` | `getInstance()` Returns the current exception monitor.
`static void` | `setInstance(ExceptionMonitor monitor)` Sets the uncaught exception monitor.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ExceptionMonitor

    public ExceptionMonitor()

Method Detail

### getInstance

    public static ExceptionMonitor getInstance()

  Returns the current exception monitor.

### setInstance

    public static void setInstance(ExceptionMonitor monitor)

  Sets the uncaught exception monitor. If `null` is specified, the default monitor will be set.

  Parameters:
    `monitor` - A new instance of `DefaultExceptionMonitor` is set if `null` is specified.

### exceptionCaught

    public abstract void exceptionCaught(Throwable cause)

  Invoked when there are any uncaught exceptions.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004-2008 Apache MINA Project. All Rights Reserved.