|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.threerings.crowd.server.PlaceManagerDelegate
public class PlaceManagerDelegate
Provides an extensible mechanism for encapsulating delegated functionality that works with the place services.
Thanks to Java's lack of multiple inheritance, it will likely become necessary to factor
certain services that might be used by a variety of PlaceManager derived classes into
delegate classes because they do not fit into the single inheritance hierarchy that makes sense
for a particular application. To facilitate this process, this delegate class is provided which
the standard place manager can be made to call out to for all of the standard methods.
| Field Summary | |
|---|---|
protected InvocationManager |
_invmgr
A reference to our invocation manager. |
protected RootDObjectManager |
_omgr
A reference to our distributed object manager. |
protected PlaceManager |
_plmgr
A reference to the manager for which we are delegating. |
| Constructor Summary | |
|---|---|
PlaceManagerDelegate()
|
|
| Method Summary | ||
|---|---|---|
protected
|
addDispatcher(InvocationDispatcher<T> disp)
Registers an invocation dispatcher and notes the registration such that it will be automatically cleared when our parent manager shuts down. |
|
protected
|
addProvider(InvocationProvider prov,
Class<T> mclass)
Registers an invocation provider and notes the registration such that it will be automatically cleared when our parent manager shuts down. |
|
void |
bodyEntered(int bodyOid)
Called when a body enters the place. |
|
void |
bodyLeft(int bodyOid)
Called when a body leaves the place. |
|
void |
bodyUpdated(OccupantInfo info)
Called when a body occupant info is updated. |
|
void |
didInit(PlaceConfig config)
Called when the place manager is initialized. |
|
void |
didShutdown()
Called when the place manager is shut down. |
|
void |
didStartup(PlaceObject plobj)
Called when the place manager is started up. |
|
void |
init(PlaceManager plmgr,
RootDObjectManager omgr,
InvocationManager invmgr)
Called by the place manager when this delegate is registered with it. |
|
void |
placeBecameEmpty()
Called when the last body leaves the place. |
|
String |
where()
Invokes PlaceManager.where(). |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected PlaceManager _plmgr
protected RootDObjectManager _omgr
protected InvocationManager _invmgr
| Constructor Detail |
|---|
public PlaceManagerDelegate()
| Method Detail |
|---|
public void init(PlaceManager plmgr,
RootDObjectManager omgr,
InvocationManager invmgr)
didInit(com.threerings.crowd.data.PlaceConfig), etc.
public void didInit(PlaceConfig config)
public void didStartup(PlaceObject plobj)
public void didShutdown()
public void bodyEntered(int bodyOid)
public void bodyLeft(int bodyOid)
public void bodyUpdated(OccupantInfo info)
public void placeBecameEmpty()
public String where()
PlaceManager.where().
protected <T extends InvocationMarshaller<?>> T addProvider(InvocationProvider prov,
Class<T> mclass)
protected <T extends InvocationMarshaller<?>> T addDispatcher(InvocationDispatcher<T> disp)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||