com.threerings.presents.dobj
Class ObjectDestroyedEvent
java.lang.Object
com.threerings.presents.dobj.DEvent
com.threerings.presents.dobj.ObjectDestroyedEvent
- All Implemented Interfaces:
- Streamable
public class ObjectDestroyedEvent
- extends DEvent
An object destroyed event is dispatched when an object has been removed
from the distributed object system. It can also be constructed to
request an attribute change on an object and posted to the dobjmgr.
- See Also:
DObjectManager.postEvent(com.threerings.presents.dobj.DEvent)
|
Constructor Summary |
ObjectDestroyedEvent(int targetOid)
Constructs a new object destroyed event for the specified distributed object. |
|
Method Summary |
boolean |
applyToObject(DObject target)
Applies the attribute modifications represented by this event to the specified target
object. |
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 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.DEvent |
alreadyApplied, getActualTransport, getSourceOid, getTargetOid, getTransport, isPrivate, noteActualTransport, setSourceOid, setTargetOid, setTransport, toString |
ObjectDestroyedEvent
public ObjectDestroyedEvent(int targetOid)
- Constructs a new object destroyed event for the specified distributed object.
- Parameters:
targetOid - the object id of the object that will be destroyed.
applyToObject
public boolean applyToObject(DObject target)
throws ObjectAccessException
- Description copied from class:
DEvent
- Applies the attribute modifications represented by this event to the specified target
object. This is called by the distributed object manager in the course of dispatching events
and should not be called directly.
- Specified by:
applyToObject in class DEvent
- Returns:
- true if the object manager should go on to notify the object's listeners of this
event, false if the event should be treated silently and the listeners should not be
notified.
- Throws:
ObjectAccessException - thrown if there is any problem applying the event to the
object (invalid attribute, etc.).
notifyListener
protected void notifyListener(Object listener)
- Description copied from class:
DEvent
- Events with associated listener interfaces should implement this function and notify the
supplied listener if it implements their event listening interface. For example, the
AttributeChangedEvent will notify listeners that implement AttributeChangeListener.
- Overrides:
notifyListener in class DEvent
toString
protected void toString(StringBuilder buf)
- Description copied from class:
DEvent
- 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.
- Overrides:
toString in class DEvent