Package org.cometd.oort
Class OortList.DeltaListener<E>
java.lang.Object
org.cometd.oort.OortList.DeltaListener<E>
- Type Parameters:
E- the element type
- All Implemented Interfaces:
EventListener,OortObject.Listener<List<E>>
public static class OortList.DeltaListener<E>
extends Object
implements OortObject.Listener<List<E>>
An implementation of OortObject.Listener that converts whole list events into OortList.ElementListener events.
For example, if an entity list:
[A, B]
is replaced by a list:
[A, C, D]
then this listener generates two "add" events for C and D
and one "remove" event for B.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidonRemoved(OortObject.Info<List<E>> 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<List<E>> oldInfo, OortObject.Info<List<E>> newInfo) Callback method invoked when the object value is updated.
-
Constructor Details
-
DeltaListener
-
-
Method Details
-
onUpdated
Description copied from interface:OortObject.ListenerCallback method invoked when the object value is updated.- Specified by:
onUpdatedin interfaceOortObject.Listener<E>- Parameters:
oldInfo- theOortObject.Infobefore the change, may be nullnewInfo- theOortObject.Infoafter the change
-
onRemoved
Description copied from interface:OortObject.ListenerCallback method invoked when the object value is removed, for example because the correspondent node has been shut down or crashed.- Specified by:
onRemovedin interfaceOortObject.Listener<E>- Parameters:
info- theOortObject.Infobefore the removal
-