T
- Data type transported in updatespublic interface IPublishSubscribe<T>
Modifier and Type | Method and Description |
---|---|
void |
attach(IObserver<T> observer)
Add an observer to the list of observers
|
boolean |
detach(IObserver<T> observer)
Removes an observer from the list of observers
|
void |
detachAll()
Removes all observers from the list of observers
|
void |
onStateChange(T content)
Called to inform observer about a change in state
|
void attach(IObserver<T> observer)
observer
- The observer that wants to be addedboolean detach(IObserver<T> observer)
observer
- The observer that wants to be removedvoid detachAll()
void onStateChange(T content)
content
- the object that contains the changed information