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<?>>
AnObservableObserver
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 itsonSubscribe(SubscribeEvent)
oronUnsubscribe(UnsubscribeEvent)
methods invoked when the according functionality is invoked upon the observable in question.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
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 Detail
-
onSubscribe
void onSubscribe(SubscribeEvent<O> aSubscribeEvent)
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
void onUnsubscribe(UnsubscribeEvent<O> aUnsubscribeEvent)
This method is called when information about an Observable which was previously requested using an asynchronous interface becomes available.- Parameters:
aUnsubscribeEvent
- the unsubscribe event
-
-