net.gleamynode.netty2
Class ExceptionLoggingMonitor

java.lang.Object
  extended by net.gleamynode.netty2.ExceptionLoggingMonitor
All Implemented Interfaces:
ExceptionMonitor

public class ExceptionLoggingMonitor
extends Object
implements ExceptionMonitor

An ExceptionMonitor which logs uncaught exceptions. It tries to log an exception using Apache Jakarta Commons Logging first. If failed, it will write it out to stderr.

Version:
$Rev: 4 $, $Date: 2005-04-18 12:04:09 +0900 $
Author:
Trustin Lee (http://gleamynode.net/)

Constructor Summary
protected ExceptionLoggingMonitor()
          Creates a new instance.
 
Method Summary
 void exceptionCaught(Throwable exception)
          Invoked when a uncaught exception is thrown.
static ExceptionLoggingMonitor getInstance()
          Returns the instance.
protected static void logError(String message, Throwable cause)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExceptionLoggingMonitor

protected ExceptionLoggingMonitor()
Creates a new instance.

Method Detail

logError

protected static void logError(String message,
                               Throwable cause)

getInstance

public static ExceptionLoggingMonitor getInstance()
Returns the instance.


exceptionCaught

public void exceptionCaught(Throwable exception)
Description copied from interface: ExceptionMonitor
Invoked when a uncaught exception is thrown.

Specified by:
exceptionCaught in interface ExceptionMonitor


Copyright © 2004-2008 Trustin Lee. All Rights Reserved.