|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.util.ThrowableHandler
A static singleton that handles processing throwables that otherwise would be ignored or dumped to System.err.
Nested Class Summary | |
static interface |
ThrowableHandler.Type
Container for throwable types. |
Field Summary | |
protected static List |
listeners
The list of listeners |
Constructor Summary | |
ThrowableHandler()
|
Method Summary | |
static void |
add(int type,
Throwable t)
Add a throwable that is to be handled. |
static void |
add(Throwable t)
Add a throwable that is to be handled with unknown type. |
static void |
addError(Throwable t)
Add a throwable that is to be handled with error type. |
static void |
addThrowableListener(ThrowableListener listener)
Add a ThrowableListener to the listener list. |
static void |
addWarning(Throwable t)
Add a throwable that is to be handled with warning type. |
protected static void |
fireOnThrowable(int type,
Throwable t)
Fire onThrowable to all registered listeners. |
static void |
removeThrowableListener(ThrowableListener listener)
Remove a ThrowableListener from the listener list. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static List listeners
Constructor Detail |
public ThrowableHandler()
Method Detail |
public static void addThrowableListener(ThrowableListener listener)
listener
- ThrowableListener to add to the list.public static void removeThrowableListener(ThrowableListener listener)
listener
- ThrowableListener to remove from the list.protected static void fireOnThrowable(int type, Throwable t)
type
- The type off the throwable.t
- Throwablepublic static void add(int type, Throwable t)
type
- The type off the throwable.t
- Throwable to be handled.public static void add(Throwable t)
t
- Throwable to be handled.public static void addError(Throwable t)
t
- Throwable to be handled.public static void addWarning(Throwable t)
t
- Throwable to be handled.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |