|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.threerings.presents.client.BasicDirector
com.threerings.bureau.client.BureauDirector
public abstract class BureauDirector
Allows the server to create and destroy agents on a client.
BureauRegistry| Field Summary | |
|---|---|
protected IntMap<Agent> |
_agents
|
protected BureauService |
_bureauService
|
protected BureauContext |
_ctx
|
protected IntMap<SafeSubscriber<AgentObject>> |
_subscribers
|
| Fields inherited from class com.threerings.presents.client.BasicDirector |
|---|
_availableInStandalone |
| Constructor Summary | |
|---|---|
BureauDirector(BureauContext ctx)
Creates a new BureauDirector. |
|
| Method Summary | |
|---|---|
void |
clientDidLogon(Client client)
Called after the client successfully connected to and authenticated with the server. |
protected abstract Agent |
createAgent(AgentObject agentObj)
Called when it is time to create an Agent. |
protected void |
createAgent(int agentId)
Creates a new agent when the server requests it. |
protected void |
destroyAgent(int agentId)
Destroys an agent at the server's request. |
protected void |
fetchServices(Client client)
Derived directors can override this method and obtain any services they'll need during their operation via calls to Client.getService(java.lang.Class. |
protected void |
objectAvailable(AgentObject agentObject)
Callback for when the a request to subscribe to an object finishes and the object is available. |
protected void |
registerServices(Client client)
If a director makes use of bootstrap invocation services which are part of a bootstrap service group, it should register interest in that group here with a call to Client.addServiceGroup(java.lang.String). |
protected void |
requestFailed(int oid,
ObjectAccessException cause)
Callback for when the a request to subscribe to an object fails. |
| Methods inherited from class com.threerings.presents.client.BasicDirector |
|---|
assertAvailable, clientDidLogoff, clientObjectDidChange, clientObjectUpdated, clientWillLogon, isAvailable, isAvailableInStandalone, setAvailableInStandalone |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected BureauContext _ctx
protected BureauService _bureauService
protected IntMap<Agent> _agents
protected IntMap<SafeSubscriber<AgentObject>> _subscribers
| Constructor Detail |
|---|
public BureauDirector(BureauContext ctx)
| Method Detail |
|---|
public void clientDidLogon(Client client)
SessionObserver
clientDidLogon in interface SessionObserverclientDidLogon in class BasicDirectorprotected void createAgent(int agentId)
protected void destroyAgent(int agentId)
protected void objectAvailable(AgentObject agentObject)
protected void requestFailed(int oid,
ObjectAccessException cause)
protected void registerServices(Client client)
BasicDirectorClient.addServiceGroup(java.lang.String).
registerServices in class BasicDirectorprotected void fetchServices(Client client)
BasicDirectorClient.getService(java.lang.Class) . If the director is available, it will
automatically be called when the client logs on or when the director is constructed if it is
constructed after the client is already logged on.
fetchServices in class BasicDirectorprotected abstract Agent createAgent(AgentObject agentObj)
agentObject's type and/or properties to determine what kind of Agent to
create.
agentObj - the distributed and object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||