com.threerings.crowd.client
Class TestClient.CrowdContextImpl

java.lang.Object
  extended by com.threerings.crowd.client.TestClient.CrowdContextImpl
All Implemented Interfaces:
CrowdContext, PresentsContext
Enclosing class:
TestClient

protected class TestClient.CrowdContextImpl
extends Object
implements CrowdContext


Constructor Summary
protected TestClient.CrowdContextImpl()
           
 
Method Summary
 void clearPlaceView(PlaceView view)
          When the client leaves a place, the place controller will remove any place view it set previously via CrowdContext.setPlaceView(com.threerings.crowd.client.PlaceView) with a call to this method.
 ChatDirector getChatDirector()
          Provides access to the chat director.
 Client getClient()
          Returns a reference to the client.
 Config getConfig()
          Provides a configuration object from which various services can obtain configuration values and via the properties file that forms the basis of the configuration object, those services can be customized.
 DObjectManager getDObjectManager()
          Returns a reference to the distributed object manager.
 LocationDirector getLocationDirector()
          Returns a reference to the location director.
 MessageManager getMessageManager()
          Returns a reference to the message manager used by the client to generate localized messages.
 OccupantDirector getOccupantDirector()
          Returns a reference to the occupant director.
 void setPlaceView(PlaceView view)
          When the client enters a new place, the location director creates a place controller which then creates a place view to visualize the place for the user.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestClient.CrowdContextImpl

protected TestClient.CrowdContextImpl()
Method Detail

getConfig

public Config getConfig()
Description copied from interface: PresentsContext
Provides a configuration object from which various services can obtain configuration values and via the properties file that forms the basis of the configuration object, those services can be customized.

Specified by:
getConfig in interface PresentsContext

getClient

public Client getClient()
Description copied from interface: PresentsContext
Returns a reference to the client. This reference should be valid for the life of the application.

Specified by:
getClient in interface PresentsContext

getDObjectManager

public DObjectManager getDObjectManager()
Description copied from interface: PresentsContext
Returns a reference to the distributed object manager. This reference is only valid for the duration of a session.

Specified by:
getDObjectManager in interface PresentsContext

getLocationDirector

public LocationDirector getLocationDirector()
Description copied from interface: CrowdContext
Returns a reference to the location director.

Specified by:
getLocationDirector in interface CrowdContext

getOccupantDirector

public OccupantDirector getOccupantDirector()
Description copied from interface: CrowdContext
Returns a reference to the occupant director.

Specified by:
getOccupantDirector in interface CrowdContext

getChatDirector

public ChatDirector getChatDirector()
Description copied from interface: CrowdContext
Provides access to the chat director.

Specified by:
getChatDirector in interface CrowdContext

getMessageManager

public MessageManager getMessageManager()
Description copied from interface: CrowdContext
Returns a reference to the message manager used by the client to generate localized messages.

Specified by:
getMessageManager in interface CrowdContext

setPlaceView

public void setPlaceView(PlaceView view)
Description copied from interface: CrowdContext
When the client enters a new place, the location director creates a place controller which then creates a place view to visualize the place for the user. The place view created by the place controller will be passed to this function to actually display it in whatever user interface is provided for the user. We don't require any particular user interface toolkit, so it is expected that the place view implementation will coordinate with the client implementation so that the client can display the view provided by the place controller.

Though the place view is created before we enter the place, it won't be displayed (via a call to this function) until we have fully entered the place and are ready for user interaction.

Specified by:
setPlaceView in interface CrowdContext

clearPlaceView

public void clearPlaceView(PlaceView view)
Description copied from interface: CrowdContext
When the client leaves a place, the place controller will remove any place view it set previously via CrowdContext.setPlaceView(com.threerings.crowd.client.PlaceView) with a call to this method.

Specified by:
clearPlaceView in interface CrowdContext