|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.goldenhammer.correctness.ExceptionMonitor
This is the ExceptionMonitor. It provides a single point of access for dealing with exceptions. The handling is delegated to an instance of an ExceptionHandler contained within. The handler utilizes the Strategy pattern so that the way in which it is handled can be changed dynamically.
Constructor Summary | |
ExceptionMonitor()
|
Method Summary | |
void |
handle(java.lang.Exception e)
Deals with the exception using the handler which this class was initialized with. |
static ExceptionMonitor |
instance()
Returns the instance of the exception monitor. |
void |
setExceptionHandler(ExceptionHandler handler)
Changes the monitor's handler to the specified ExceptionHandler. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ExceptionMonitor()
Method Detail |
public static ExceptionMonitor instance()
public void setExceptionHandler(ExceptionHandler handler)
handler
- The handler to use for this monitor.public void handle(java.lang.Exception e)
e
- The exception to handle.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |