public abstract class DEvent extends Object implements Streamable
Streamable.Closure| Modifier and Type | Field and Description |
|---|---|
long |
eventId
This event's "number".
|
| Constructor and Description |
|---|
DEvent(int targetOid)
Constructs a new distributed object event that pertains to the specified distributed object.
|
| 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
applyToObject(com.threerings.presents.dobj.DObject) is called, it should return true from this method. |
abstract boolean |
applyToObject(DObject target)
Applies the attribute modifications represented by this event to the specified target
object.
|
Transport |
getActualTransport()
Returns the actual transport with which the event was transmitted, or
null if
not yet known. |
int |
getSourceOid()
Returns the object id of the client that generated this event.
|
int |
getTargetOid()
Returns the oid of the object that is the target of this event.
|
Transport |
getTransport()
Returns the transport parameters.
|
boolean |
isPrivate()
Some events are used only internally on the server and need not be broadcast to subscribers,
proxy or otherwise.
|
void |
noteActualTransport(Transport transport)
Notes the actual transport with which the event was transmitted.
|
void |
setSourceOid(int sourceOid)
Do not call this method.
|
void |
setTargetOid(int targetOid)
Do not call this method.
|
DEvent |
setTransport(Transport transport)
Sets the transport parameters.
|
String |
toString() |
public transient long eventId
public DEvent(int targetOid)
public int getTargetOid()
public boolean isPrivate()
public boolean alreadyApplied()
applyToObject(com.threerings.presents.dobj.DObject) is called, it should return true from this method.
If it will modify the object during its applyToObject(com.threerings.presents.dobj.DObject) call, it should return false.public abstract boolean applyToObject(DObject target) throws ObjectAccessException
ObjectAccessException - thrown if there is any problem applying the event to the
object (invalid attribute, etc.).public int getSourceOid()
public void setTargetOid(int targetOid)
public void setSourceOid(int sourceOid)
public DEvent setTransport(Transport transport)
public Transport getTransport()
public void noteActualTransport(Transport transport)
public Transport getActualTransport()
null if
not yet known.Copyright © 2015. All rights reserved.