kiss
Observer
<V
>
V
>Provides a mechanism for receiving push-based notifications.
After an Observer
calls an Signal#to(Observer)
method, the Signal
calls
the #accept(Object)
method to provide notifications. A well-behaved Signal
will
call an #complete()
closure exactly once or the Observer's #error(Throwable)
closure exactly once.
complete
()
void
Notifies the observer that the provider has finished sending push-based notifications.
The Signal
will not call this closure if it calls #error(Throwable)
.
error
(Throwable
e
)
void
Throwable
e
)Throwable e |
An object that provides additional information about the error. |
Notifies the observer that the provider has experienced an error condition.
If the Signal
calls this closure, it will not thereafter call #accept(Object)
or #complete()
.