Files
narya/src/java/com/threerings/presents/dobj/ObjectDestroyedEvent.java
T
Michael Bayne ee9049fe3e Factored out code for events that all shared a name; removed
hand-serialization code for fields which are now handled automatically.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2078 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-20 23:29:04 +00:00

58 lines
1.5 KiB
Java

//
// $Id: ObjectDestroyedEvent.java,v 1.5 2002/12/20 23:29:04 mdb Exp $
package com.threerings.presents.dobj;
/**
* 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 DObjectManager#postEvent
*/
public class ObjectDestroyedEvent extends DEvent
{
/**
* Constructs a new object destroyed event for the specified
* distributed object.
*
* @param targetOid the object id of the object that will be destroyed.
*/
public ObjectDestroyedEvent (int targetOid)
{
super(targetOid);
}
/**
* Constructs a blank instance of this event in preparation for
* unserialization from the network.
*/
public ObjectDestroyedEvent ()
{
}
// documentation inherited
public boolean applyToObject (DObject target)
throws ObjectAccessException
{
// nothing to do in preparation for destruction, the omgr will
// have to recognize this type of event and do the right thing
return true;
}
// documentation inherited
protected void notifyListener (Object listener)
{
if (listener instanceof ObjectDeathListener) {
((ObjectDeathListener)listener).objectDestroyed(this);
}
}
// documentation inherited
protected void toString (StringBuffer buf)
{
buf.append("DESTROY:");
super.toString(buf);
}
}