|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectariba.util.log.ExceptionLogService
public abstract class ExceptionLogService
Service to trap and log exceptions that would otherwise go unhandled
Field Summary | |
---|---|
static ThreadDebugKey |
ExceptionContextObjectKey
Allows the caller to set a context object to be associated to exceptions that may occur while handling that object. |
Constructor Summary | |
---|---|
ExceptionLogService()
|
Method Summary | |
---|---|
static ExceptionLogService |
getService()
|
abstract long |
onException(java.lang.Object contextObjectId,
java.lang.Throwable exception)
Log an exception. |
abstract long |
onException(org.apache.log4j.Priority level,
java.lang.Object contextObjectId,
java.lang.Throwable exception,
java.lang.String message)
Log an exception. |
abstract long |
onException(java.lang.Throwable exception)
Log an exception. |
static void |
setService(ExceptionLogService service)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final ThreadDebugKey ExceptionContextObjectKey
ClusterRoot
or a BaseId
. Note that care needs to be taken when using this
paradigm, as lots of background processing may happen in new threads.
Constructor Detail |
---|
public ExceptionLogService()
Method Detail |
---|
public abstract long onException(java.lang.Throwable exception)
ExceptionContextObjectKey
in the ThreadDebugState
the exception will be associated to that
object.
exception
- - Exception to be logged.
public abstract long onException(java.lang.Object contextObjectId, java.lang.Throwable exception)
ExceptionContextObjectKey
in the ThreadDebugState
the exception will be associated to that
object, else it will be associated to the context object passed in.
contextObjectId
- - a BaseId
or ClusterRoot
,
if a context for this exception is available. Can be
null.exception
- - Exception to be logged
public abstract long onException(org.apache.log4j.Priority level, java.lang.Object contextObjectId, java.lang.Throwable exception, java.lang.String message)
ExceptionContextObjectKey
in the ThreadDebugState
the exception will be associated to that
object, else it will be associated to the context object passed in.
level
- - log level (INFO, WARN or ERROR)contextObjectId
- - a BaseId
or ClusterRoot
,
if a context for this exception is available. Can be
null.exception
- - Exception to be loggedmessage
- - custom message text
public static void setService(ExceptionLogService service)
public static ExceptionLogService getService()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |