|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.EventObject
org.dellroad.stuff.pobj.PersistentObjectEvent<T>
T - type of the root persistent objectpublic class PersistentObjectEvent<T>
Notification event emitted by a PersistentObject to listeners whenever there is an update to the root object.
| Field Summary |
|---|
| Fields inherited from class java.util.EventObject |
|---|
source |
| Constructor Summary | |
|---|---|
PersistentObjectEvent(PersistentObject<T> persistentObject,
long version,
T oldRoot,
T newRoot)
|
|
| Method Summary | |
|---|---|
T |
getNewRoot()
Get the new root after to the update. |
T |
getOldRoot()
Get the old root prior to the update. |
PersistentObject<T> |
getSource()
Get the PersistentObject that originated this event. |
long |
getVersion()
Get the version that this event is associated with. |
| Methods inherited from class java.util.EventObject |
|---|
toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public PersistentObjectEvent(PersistentObject<T> persistentObject,
long version,
T oldRoot,
T newRoot)
| Method Detail |
|---|
public PersistentObject<T> getSource()
PersistentObject that originated this event.
getSource in class EventObjectpublic long getVersion()
The PersistentObject class always delivers notifications in order, so this
number should always increase over time.
public T getOldRoot()
The caller must not modify the returned object, as it is shared among all listeners.
public T getNewRoot()
The caller must not modify the returned object, as it is shared among all listeners.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||