Added convenience method for posting a message event to a distributed
object. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1681 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: DObject.java,v 1.47 2002/08/14 19:07:55 mdb Exp $
|
||||
// $Id: DObject.java,v 1.48 2002/09/13 06:41:34 mdb Exp $
|
||||
|
||||
package com.threerings.presents.dobj;
|
||||
|
||||
@@ -438,6 +438,27 @@ public class DObject implements Streamable
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Posts a message event on this distrubuted object.
|
||||
*/
|
||||
public void postMessage (String name, Object[] args)
|
||||
{
|
||||
postEvent(new MessageEvent(_oid, name, args));
|
||||
}
|
||||
|
||||
/**
|
||||
* Posts the specified event either to our dobject manager or to the
|
||||
* compound event for which we are currently transacting.
|
||||
*/
|
||||
public void postEvent (DEvent event)
|
||||
{
|
||||
if (_tevent != null) {
|
||||
_tevent.postEvent(event);
|
||||
} else {
|
||||
_omgr.postEvent(event);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if this object is active and registered with the
|
||||
* distributed object system. If an object is created via
|
||||
@@ -496,19 +517,6 @@ public class DObject implements Streamable
|
||||
return buf.append("]").toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Posts the specified event either to our dobject manager or to the
|
||||
* compound event for which we are currently transacting.
|
||||
*/
|
||||
public void postEvent (DEvent event)
|
||||
{
|
||||
if (_tevent != null) {
|
||||
_tevent.postEvent(event);
|
||||
} else {
|
||||
_omgr.postEvent(event);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Begins a transaction on this distributed object. In some
|
||||
* situations, it is desirable to cause multiple changes to
|
||||
|
||||
Reference in New Issue
Block a user