|
||||||||||
| 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.whirled.zone.client.ZoneDirector
public class ZoneDirector
The zone director augments the scene services with the notion of zones. Zones are self-contained, connected groups of scenes. The normal scene director services can be used to move from scene to scene, but moving to a new zone requires a special move request which can be accomplished via the zone director. The zone director also makes available the zone summary which provides information on the zone which can be used to generate an overview map or similar.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.threerings.presents.client.InvocationReceiver |
|---|
com.threerings.presents.client.InvocationReceiver.Registration |
| Constructor Summary | |
|---|---|
ZoneDirector(WhirledContext ctx,
SceneDirector scdir)
Constructs a zone director with the supplied context, and delegate scene director (which the zone director will coordinate with when moving from scene to scene). |
|
| Method Summary | |
|---|---|
void |
addZoneObserver(ZoneObserver observer)
Adds a zone observer to the list. |
void |
clientDidLogoff(com.threerings.presents.client.Client client)
|
void |
forcedMove(int zoneId,
int sceneId)
Used to communicate a required move notification to the client. |
ZoneSummary |
getZoneSummary()
Returns the summary for the zone currently occupied by the client or null if the client does not currently occupy a zone (not a normal situation). |
void |
moveRequiresServerSwitch(String hostname,
int[] ports)
Indicates that the client must switch to the specified server and reissue its move request in order to relocate to its desired zone. |
void |
moveSucceeded(int placeId,
com.threerings.crowd.data.PlaceConfig config,
ZoneSummary summary)
Called in response to a successful ZoneService.moveTo(int, int, int, com.threerings.whirled.zone.client.ZoneService.ZoneMoveListener) request. |
void |
moveSucceededWithScene(int placeId,
com.threerings.crowd.data.PlaceConfig config,
ZoneSummary summary,
SceneModel model)
Called in response to a successful ZoneService.moveTo(int, int, int, com.threerings.whirled.zone.client.ZoneService.ZoneMoveListener) request when our cached
scene was out of date and the server determined that we needed an updated copy. |
void |
moveSucceededWithUpdates(int placeId,
com.threerings.crowd.data.PlaceConfig config,
ZoneSummary summary,
SceneUpdate[] updates)
Called in response to a successful ZoneService.moveTo(int, int, int, com.threerings.whirled.zone.client.ZoneService.ZoneMoveListener) request when our cached
scene was out of date and the server determined that we needed some updates. |
boolean |
moveTo(int zoneId,
int sceneId)
Requests that this client move the specified scene in the specified zone. |
boolean |
moveTo(int zoneId,
int sceneId,
ResultListener<com.threerings.crowd.data.PlaceConfig> rl)
Requests that this client move the specified scene in the specified zone. |
void |
recoverMoveTo(int previousSceneId)
Should instruct the client to move the last known working location (as well as clean up after the failed moveTo request). |
void |
removeZoneObserver(ZoneObserver observer)
Removes a zone observer from the list. |
void |
requestFailed(String reason)
|
| Methods inherited from class com.threerings.presents.client.BasicDirector |
|---|
clientDidLogon, clientObjectDidChange, clientWillLogon, isAvailableInStandalone, setAvailableInStandalone |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ZoneDirector(WhirledContext ctx,
SceneDirector scdir)
| Method Detail |
|---|
public ZoneSummary getZoneSummary()
public void addZoneObserver(ZoneObserver observer)
public void removeZoneObserver(ZoneObserver observer)
public boolean moveTo(int zoneId,
int sceneId)
public boolean moveTo(int zoneId,
int sceneId,
ResultListener<com.threerings.crowd.data.PlaceConfig> rl)
public void clientDidLogoff(com.threerings.presents.client.Client client)
clientDidLogoff in interface com.threerings.presents.client.SessionObserverclientDidLogoff in class com.threerings.presents.client.BasicDirector
public void moveRequiresServerSwitch(String hostname,
int[] ports)
ZoneService.ZoneMoveListener
moveRequiresServerSwitch in interface ZoneService.ZoneMoveListener
public void moveSucceeded(int placeId,
com.threerings.crowd.data.PlaceConfig config,
ZoneSummary summary)
ZoneService.ZoneMoveListenerZoneService.moveTo(int, int, int, com.threerings.whirled.zone.client.ZoneService.ZoneMoveListener) request.
moveSucceeded in interface ZoneService.ZoneMoveListener
public void moveSucceededWithUpdates(int placeId,
com.threerings.crowd.data.PlaceConfig config,
ZoneSummary summary,
SceneUpdate[] updates)
ZoneService.ZoneMoveListenerZoneService.moveTo(int, int, int, com.threerings.whirled.zone.client.ZoneService.ZoneMoveListener) request when our cached
scene was out of date and the server determined that we needed some updates.
moveSucceededWithUpdates in interface ZoneService.ZoneMoveListener
public void moveSucceededWithScene(int placeId,
com.threerings.crowd.data.PlaceConfig config,
ZoneSummary summary,
SceneModel model)
ZoneService.ZoneMoveListenerZoneService.moveTo(int, int, int, com.threerings.whirled.zone.client.ZoneService.ZoneMoveListener) request when our cached
scene was out of date and the server determined that we needed an updated copy.
moveSucceededWithScene in interface ZoneService.ZoneMoveListenerpublic void requestFailed(String reason)
requestFailed in interface com.threerings.presents.client.InvocationService.InvocationListener
public void forcedMove(int zoneId,
int sceneId)
ZoneReceiverZoneService.moveTo(int, int, int, com.threerings.whirled.zone.client.ZoneService.ZoneMoveListener) request to move to the new scene in the specified
zone.
forcedMove in interface ZoneReceiverpublic void recoverMoveTo(int previousSceneId)
SceneDirector.MoveHandler
recoverMoveTo in interface SceneDirector.MoveHandler
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||