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:
@@ -161,17 +161,20 @@ public class PlaceManager
|
||||
}
|
||||
|
||||
/**
|
||||
* A place manager derived class is likely to have a corresponding
|
||||
* derived class of {@link com.threerings.crowd.data.PlaceObject} that
|
||||
* it will be managing. Derived classes should override this method
|
||||
* and return the class object for the place object derived class they
|
||||
* desire to use. The place registry will use this method to create
|
||||
* the proper place object during the place creation process.
|
||||
*
|
||||
* @return the class of the class, derived from {@link PlaceObject},
|
||||
* that this manager wishes to manage.
|
||||
*
|
||||
* @see PlaceRegistry#createPlace
|
||||
* Derived classes will generally override this method to create a custom
|
||||
* {@link PlaceObject} derivation that contains extra information.
|
||||
*/
|
||||
protected PlaceObject createPlaceObject ()
|
||||
{
|
||||
try {
|
||||
return getPlaceObjectClass().newInstance();
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link #createPlaceObject}.
|
||||
*/
|
||||
protected Class<? extends PlaceObject> getPlaceObjectClass ()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user