|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.threerings.presents.dobj.DEvent
com.threerings.presents.dobj.NamedEvent
com.threerings.presents.dobj.EntryEvent<T>
com.threerings.presents.dobj.EntryUpdatedEvent<T>
T - the type of entry being handled by this event. This must match the type on the set
that generated this event.public class EntryUpdatedEvent<T extends DSet.Entry>
An entry updated event is dispatched when an entry of a DSet is updated. It can also be
constructed to request the update of an entry and posted to the dobjmgr.
DObjectManager.postEvent(com.threerings.presents.dobj.DEvent)| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.threerings.io.Streamable |
|---|
Streamable.Closure |
| Field Summary | |
|---|---|
protected T |
_entry
|
protected T |
_oldEntry
|
| Fields inherited from class com.threerings.presents.dobj.NamedEvent |
|---|
_name |
| Fields inherited from class com.threerings.presents.dobj.DEvent |
|---|
_actualTransport, _soid, _toid, _transport, eventId, UNSET_OLD_ENTRY, UNSET_OLD_VALUE |
| Constructor Summary | |
|---|---|
EntryUpdatedEvent(int targetOid,
String name,
T entry)
Constructs a new entry updated event on the specified target object for the specified set name and with the supplied updated entry. |
|
| Method Summary | |
|---|---|
boolean |
alreadyApplied()
If this event applies itself immediately to the distributed object on the server and then NOOPs later when DEvent.applyToObject(com.threerings.presents.dobj.DObject) is called, it should return true from this method. |
boolean |
applyToObject(DObject target)
Applies the attribute modifications represented by this event to the specified target object. |
T |
getEntry()
Return the new or updated entry, or null if the entry was removed. |
Comparable<?> |
getKey()
Return the key that identifies the entry related to this event. |
T |
getOldEntry()
Return the old entry, or null if the entry is newly added. |
protected void |
notifyListener(Object listener)
Events with associated listener interfaces should implement this function and notify the supplied listener if it implements their event listening interface. |
protected EntryUpdatedEvent<T> |
setOldEntry(T oldEntry)
|
protected void |
toString(StringBuilder buf)
This should be overridden by derived classes (which should be sure to call super.toString()) to append the derived class specific event information to the
string buffer. |
| Methods inherited from class com.threerings.presents.dobj.NamedEvent |
|---|
getName |
| Methods inherited from class com.threerings.presents.dobj.DEvent |
|---|
getActualTransport, getSourceOid, getTargetOid, getTransport, isPrivate, noteActualTransport, setSourceOid, setTargetOid, setTransport, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected T extends DSet.Entry _entry
protected transient T extends DSet.Entry _oldEntry
| Constructor Detail |
|---|
public EntryUpdatedEvent(int targetOid,
String name,
T entry)
targetOid - the object id of the object to whose set we will add an entry.name - the name of the attribute in which to update the specified entry.entry - the entry to update.| Method Detail |
|---|
public Comparable<?> getKey()
EntryEventnull.
getKey in class EntryEvent<T extends DSet.Entry>public T getEntry()
null if the entry was removed.
This implementation never returns null.
getEntry in class EntryEvent<T extends DSet.Entry>public T getOldEntry()
null if the entry is newly added.
This implementation never returns null.
getOldEntry in class EntryEvent<T extends DSet.Entry>public boolean alreadyApplied()
DEventDEvent.applyToObject(com.threerings.presents.dobj.DObject) is called, it should return true from this method.
If it will modify the object during its DEvent.applyToObject(com.threerings.presents.dobj.DObject) call, it should return false.
alreadyApplied in class DEvent
public boolean applyToObject(DObject target)
throws ObjectAccessException
DEvent
applyToObject in class DEventObjectAccessException - thrown if there is any problem applying the event to the
object (invalid attribute, etc.).protected void notifyListener(Object listener)
DEventAttributeChangedEvent will notify listeners that implement AttributeChangeListener.
notifyListener in class DEventprotected void toString(StringBuilder buf)
DEventsuper.toString()) to append the derived class specific event information to the
string buffer.
toString in class NamedEventprotected EntryUpdatedEvent<T> setOldEntry(T oldEntry)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||