com.threerings.crowd.data
Class PlaceConfig

java.lang.Object
  extended by com.threerings.io.SimpleStreamableObject
      extended by com.threerings.crowd.data.PlaceConfig
All Implemented Interfaces:
Streamable

public abstract class PlaceConfig
extends SimpleStreamableObject

The place config class encapsulates the configuration information for a particular type of place. The hierarchy of place config objects mimics the hierarchy of place managers and controllers. Both the place manager and place controller are provided with the place config object when the place is created.

The place config object is also the mechanism used to instantiate the appropriate place manager and controller. Every place must have an associated place config derived class that overrides createController() and getManagerClassName(), returning the appropriate place controller and manager class for that place.


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.threerings.io.Streamable
Streamable.Closure
 
Constructor Summary
PlaceConfig()
           
 
Method Summary
 PlaceController createController()
          Create the controller that should be used for this place.
 Class<?> getControllerClass()
          Deprecated. Override createController() directly.
abstract  String getManagerClassName()
          Returns the name of the class that should be used to create a manager for this place.
protected  void toString(StringBuilder buf)
          Handles the toString-ification of all public members.
 
Methods inherited from class com.threerings.io.SimpleStreamableObject
toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PlaceConfig

public PlaceConfig()
Method Detail

getControllerClass

@Deprecated
public Class<?> getControllerClass()
Deprecated. Override createController() directly.

Returns the class that should be used to create a controller for this place. The controller class must derive from PlaceController.


createController

public PlaceController createController()
Create the controller that should be used for this place.


getManagerClassName

public abstract String getManagerClassName()
Returns the name of the class that should be used to create a manager for this place. The manager class must derive from PlaceManager. Note: this method differs from createController() because we want to avoid compile time linkage of the place config object (which is used on the client) to server code. This allows a code optimizer (DashO Pro, for example) to remove the server code from the client, knowing that it is never used.


toString

protected void toString(StringBuilder buf)
Description copied from class: SimpleStreamableObject
Handles the toString-ification of all public members. Derived classes can override and include non-public members if desired.

Overrides:
toString in class SimpleStreamableObject