Revamped distributed object creation. There was no particular reason to create
distributed objects by reflection since we don't allow clients to create objects, furthermore we needn't do it asynchronously. The object creation methods were moved into the server-side only interface and made "immediate", so the caller creates a derived instance of DObject and registers it with the system instead of creating it with a Subscriber callback. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4342 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -39,23 +39,6 @@ public interface DObjectManager
|
||||
*/
|
||||
public boolean isManager (DObject object);
|
||||
|
||||
/**
|
||||
* Creates a distributed object instance of the supplied class and
|
||||
* notifies the specified subscriber when it becomes available. This
|
||||
* is the proper mechanism for constructing a new distributed object
|
||||
* as it is the only way in which it can be properly registered with
|
||||
* the dobj system.
|
||||
*
|
||||
* @param dclass The class object of the derived class of
|
||||
* <code>DObject</code> (or <code>DObject.class</code> itself) that
|
||||
* should be instantiated.
|
||||
* @param target The subscriber to be notified when the object is
|
||||
* created and available, or if there was a problem creating the
|
||||
* object.
|
||||
*/
|
||||
public <T extends DObject> void createObject (
|
||||
Class<T> dclass, Subscriber<T> target);
|
||||
|
||||
/**
|
||||
* Requests that the specified subscriber be subscribed to the object
|
||||
* identified by the supplied object id. That subscriber will be
|
||||
@@ -83,15 +66,6 @@ public interface DObjectManager
|
||||
public <T extends DObject> void unsubscribeFromObject (
|
||||
int oid, Subscriber<T> target);
|
||||
|
||||
/**
|
||||
* Requests that the specified object be destroyed. Once destroyed an
|
||||
* object is removed from the runtime system and may no longer have
|
||||
* events dispatched on it.
|
||||
*
|
||||
* @param oid The object id of the distributed object to be destroyed.
|
||||
*/
|
||||
public void destroyObject (int oid);
|
||||
|
||||
/**
|
||||
* Posts a distributed object event into the system. Instead of
|
||||
* requesting the modification of a distributed object attribute by
|
||||
|
||||
Reference in New Issue
Block a user