public class ObjectAddedEvent extends NamedEvent
OidList attribute
of a distributed object. It can also be constructed to request the addition of an oid to an
OidList attribute of an object and posted to the dobjmgr.Streamable.Closure| Constructor and Description |
|---|
ObjectAddedEvent(int targetOid,
String name,
int oid)
Constructs a new object added event on the specified target object with the supplied oid
list attribute name and object id to add.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
int |
getOid()
Returns the oid that has been added.
|
getNamegetActualTransport, getSourceOid, getTargetOid, getTransport, isPrivate, noteActualTransport, setSourceOid, setTargetOid, setTransport, toStringpublic ObjectAddedEvent(int targetOid,
String name,
int oid)
targetOid - the object id of the object to whose oid list we will add an oid.name - the name of the attribute (data member) to which to add the specified oid.oid - the oid to add to the oid list attribute.public int getOid()
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 DEventpublic boolean applyToObject(DObject target) throws ObjectAccessException
DEventapplyToObject in class DEventObjectAccessException - thrown if there is any problem applying the event to the
object (invalid attribute, etc.).Copyright © 2015. All rights reserved.