Package org.cometd.oort
Interface OortObject.Listener<T>
-
- Type Parameters:
T- the object type
- All Superinterfaces:
java.util.EventListener
- All Known Implementing Classes:
OortList.DeltaListener,OortMap.DeltaListener,OortObject.Listener.Adapter
- Enclosing class:
- OortObject<T>
public static interface OortObject.Listener<T> extends java.util.EventListenerListener for events that update the value of aOortObject.Info, either local or remote. Implementers may detect whether the value has been changed locally or remotely usingOortObject.Info.isLocal().
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classOortObject.Listener.Adapter<T>An empty implementation ofOortObject.Listener.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidonRemoved(OortObject.Info<T> info)Callback method invoked when the object value is removed, for example because the correspondent node has been shut down or crashed.voidonUpdated(OortObject.Info<T> oldInfo, OortObject.Info<T> newInfo)Callback method invoked when the object value is updated.
-
-
-
Method Detail
-
onUpdated
void onUpdated(OortObject.Info<T> oldInfo, OortObject.Info<T> newInfo)
Callback method invoked when the object value is updated.- Parameters:
oldInfo- theOortObject.Infobefore the change, may be nullnewInfo- theOortObject.Infoafter the change
-
onRemoved
void onRemoved(OortObject.Info<T> info)
Callback method invoked when the object value is removed, for example because the correspondent node has been shut down or crashed.- Parameters:
info- theOortObject.Infobefore the removal
-
-