Module org.refcodes.observer
Package org.refcodes.observer
Interface ObservableObserver<O extends Observable<?>>
- Type Parameters:
O
- The type of the observable being observed.
public interface ObservableObserver<O extends Observable<?>>
An
ObservableObserver
is an observer, observing an observable. In
this case, it is a listener interface listening for the most basic
functionality an observable must provide in order to be an observable:
Subscribing and unsubscribing of listeners (observers). The implementing
observer, when registered to an according observable, gets its
onSubscribe(SubscribeEvent)
or
onUnsubscribe(UnsubscribeEvent)
methods invoked when the according
functionality is invoked upon the observable in question.-
Method Summary
Modifier and TypeMethodDescriptionvoid
onSubscribe
(SubscribeEvent<O> aSubscribeEvent) This method is called when information about an Observable which was previously requested using an asynchronous interface becomes available.void
onUnsubscribe
(UnsubscribeEvent<O> aUnsubscribeEvent) This method is called when information about an Observable which was previously requested using an asynchronous interface becomes available.
-
Method Details
-
onSubscribe
This method is called when information about an Observable which was previously requested using an asynchronous interface becomes available.- Parameters:
aSubscribeEvent
- the subscribe event
-
onUnsubscribe
This method is called when information about an Observable which was previously requested using an asynchronous interface becomes available.- Parameters:
aUnsubscribeEvent
- the unsubscribe event
-