T - The type of event that is to be observed.public interface Observable<T>
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getType()
Get the notification type.
|
void |
registerListener(Listener<T> listener)
Register listener for notification type T.
|
void |
unregisterAllListeners()
Remove all listeners for a given type.
|
void |
unregisterListener(Listener<T> listener)
Remove a listener.
|
void registerListener(Listener<T> listener)
listener - This is the listener which will be invoked incase of an Notification.void unregisterListener(Listener<T> listener)
listener - the listener which needs to be removed.void unregisterAllListeners()
java.lang.String getType()