public class SimpleDebugNotificationListener extends DebugNotificationListener<SimpleContext<?>>
DebugNotificationListener that store all of the events in memory for analysis later.
It has unbounded growth so should not be used in a long running system.| Modifier and Type | Class and Description |
|---|---|
static class |
SimpleDebugNotificationListener.NotificationsByObservable<T> |
| Constructor and Description |
|---|
SimpleDebugNotificationListener() |
| Modifier and Type | Method and Description |
|---|---|
void |
complete(SimpleContext<?> context)
After the actual operations has completed from
DebugNotificationListener.start(DebugNotification) this is
invoked |
void |
error(SimpleContext<?> context,
java.lang.Throwable e)
After the actual operations has thrown an exception from
DebugNotificationListener.start(DebugNotification)
this is invoked |
java.util.SortedSet<SimpleDebugNotificationListener.NotificationsByObservable<?>> |
getNotificationsByObservable()
a copy sorted by time of the all the state useful for analysis.
|
<T> SimpleContext<?> |
start(DebugNotification<T> n)
For each
DebugNotification.Kind start is invoked before the actual method is invoked. |
java.lang.String |
toString() |
java.lang.String |
toString(java.util.SortedSet<SimpleDebugNotificationListener.NotificationsByObservable<?>> notificationsByObservableSnapshot) |
onNextpublic <T> SimpleContext<?> start(DebugNotification<T> n)
DebugNotificationListenerDebugNotification.Kind start is invoked before the actual method is invoked.
This can be used to perform extra logging, metrics and other such things.
start in class DebugNotificationListener<SimpleContext<?>>n - DebugNotification containing the data and context about what is happening.DebugNotificationListener.complete(Object) or
DebugNotificationListener.error(Object, Throwable) after the actual operation has ended.public void complete(SimpleContext<?> context)
DebugNotificationListenerDebugNotificationListener.start(DebugNotification) this is
invokedcomplete in class DebugNotificationListener<SimpleContext<?>>public void error(SimpleContext<?> context, java.lang.Throwable e)
DebugNotificationListenerDebugNotificationListener.start(DebugNotification)
this is invokederror in class DebugNotificationListener<SimpleContext<?>>public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String toString(java.util.SortedSet<SimpleDebugNotificationListener.NotificationsByObservable<?>> notificationsByObservableSnapshot)
public java.util.SortedSet<SimpleDebugNotificationListener.NotificationsByObservable<?>> getNotificationsByObservable()