|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ops4j.monitors.exception.ExceptionMonitorRouter
public class ExceptionMonitorRouter
A monitor of a Exceptions occuring, and capability to route/delegate these events to 0..n registered ExceptionMonitor implementations.
The purpose of this class is to support that many monitors are registered to the same Exception source.
Constructor Summary | |
---|---|
ExceptionMonitorRouter()
Creation of a exception monitor router. |
Method Summary | |
---|---|
void |
exception(ExceptionSource source,
java.lang.Throwable exception)
This method is called when an Exception or Throwable occurs. |
java.util.List<ExceptionMonitor> |
getExceptionMonitors()
Returns all ExceptionMonitors that are registered. |
ExceptionMonitor |
getMonitor(int index)
Returns the ExceptionMonitor at a particular index. |
void |
registerExceptionMonitor(ExceptionMonitor monitor)
Add a monitor to the list of monitors managed by this router. |
int |
size()
Returns the number of registered ExceptionMonitors. |
void |
unregisterExceptionMonitor(ExceptionMonitor monitor)
Remove a monitor to the list of monitors managed by this router. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ExceptionMonitorRouter()
Method Detail |
---|
public void exception(ExceptionSource source, java.lang.Throwable exception)
exception
in interface ExceptionMonitor
source
- The source of the Exception.exception
- The Exception being thrown.public void registerExceptionMonitor(ExceptionMonitor monitor)
registerExceptionMonitor
in interface ExceptionSource
monitor
- the monitor to addpublic void unregisterExceptionMonitor(ExceptionMonitor monitor)
unregisterExceptionMonitor
in interface ExceptionSource
monitor
- the monitor to addpublic java.util.List<ExceptionMonitor> getExceptionMonitors()
getExceptionMonitors
in interface ExceptionSource
public int size()
public ExceptionMonitor getMonitor(int index)
index
- which monitor in the current list to return.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |