public class ZoneDirector extends com.threerings.presents.client.BasicDirector implements ZoneReceiver, ZoneService.ZoneMoveListener, SceneDirector.MoveHandler
| Constructor and Description |
|---|
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).
|
| Modifier and Type | Method and Description |
|---|---|
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) |
public ZoneDirector(WhirledContext ctx, SceneDirector scdir)
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.BasicDirectorpublic void moveRequiresServerSwitch(String hostname, int[] ports)
ZoneService.ZoneMoveListenermoveRequiresServerSwitch in interface ZoneService.ZoneMoveListenerpublic 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.ZoneMoveListenerpublic 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.ZoneMoveListenerpublic 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.InvocationListenerpublic 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.MoveHandlerrecoverMoveTo in interface SceneDirector.MoveHandlerCopyright © 2015. All rights reserved.