|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectrx.plugins.DebugNotificationListener<C>
C - Context type that is returned from start and passed to either complete or error.public abstract class DebugNotificationListener<C>
Subclasses of this are passed into the constructor of DebugHook to receive notification
about all activity in Rx.
DebugHook| Constructor Summary | |
|---|---|
DebugNotificationListener()
|
|
| Method Summary | ||
|---|---|---|
void |
complete(C context)
After the actual operations has completed from DebugNotificationListener.start(DebugNotification) this is
invoked |
|
void |
error(C context,
java.lang.Throwable e)
After the actual operations has thrown an exception from DebugNotificationListener.start(DebugNotification)
this is invoked |
|
|
onNext(DebugNotification<T> n)
Override this to change the default behavior of returning the encapsulated value. |
|
|
start(DebugNotification<T> n)
For each DebugNotification.Kind start is invoked before the actual method is invoked. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DebugNotificationListener()
| Method Detail |
|---|
public <T> T onNext(DebugNotification<T> n)
DebugNotification.getKind() is
DebugNotification.Kind.OnNext and the value (null or not) is just about to be sent to
next Observer. This can end up being called multiple times for
the same value as it passes from Observable.Operator to Observable.Operator in the
Observable chain.
This can be used to decorate or replace the values passed into any onNext function or just perform extra logging, metrics and other such things and pass-thru the function.
n - DebugNotification containing the data and context about what is happening.
public <T> C start(DebugNotification<T> n)
DebugNotification.Kind start is invoked before the actual method is invoked.
This can be used to perform extra logging, metrics and other such things.
n - DebugNotification containing the data and context about what is happening.
#complete(C) or
#error(C, Throwable) after the actual operation has ended.public void complete(C context)
DebugNotificationListener.start(DebugNotification) this is
invoked
context -
public void error(C context,
java.lang.Throwable e)
DebugNotificationListener.start(DebugNotification)
this is invoked
context -
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||