|
||||||||||
| 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,
Throwable exception)
This method is called when an Exception or Throwable occurs. |
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,
Throwable exception)
exception in interface ExceptionMonitorsource - The source of the Exception.exception - The Exception being thrown.public void registerExceptionMonitor(ExceptionMonitor monitor)
registerExceptionMonitor in interface ExceptionSourcemonitor - the monitor to addpublic void unregisterExceptionMonitor(ExceptionMonitor monitor)
unregisterExceptionMonitor in interface ExceptionSourcemonitor - the monitor to addpublic List<ExceptionMonitor> getExceptionMonitors()
getExceptionMonitors in interface ExceptionSourcepublic 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 | |||||||||