com.threerings.micasa.client
Class MiCasaClient

java.lang.Object
  extended by com.threerings.micasa.client.MiCasaClient

public class MiCasaClient
extends Object

The MiCasa client takes care of instantiating all of the proper managers and loading up all of the necessary configuration and getting the client bootstrapped. It can be extended by games that require an extended context implementation.


Nested Class Summary
protected  class MiCasaClient.MiCasaContextImpl
          The context implementation.
 
Field Summary
protected  ChatDirector _chatdir
           
protected  Client _client
           
protected  Config _config
           
protected  MiCasaContext _ctx
           
protected  MiCasaFrame _frame
           
protected  LocationDirector _locdir
           
protected  MessageManager _msgmgr
           
protected  OccupantDirector _occdir
           
protected  ParlorDirector _pardtr
           
protected static String MESSAGE_MANAGER_PREFIX
          The prefix prepended to localization bundle names before looking them up in the classpath.
 
Constructor Summary
MiCasaClient()
           
 
Method Summary
protected  MiCasaContext createContextImpl()
          Creates the MiCasaContext implementation that will be passed around to all of the client code.
protected  void createContextServices()
          Creates and initializes the various services that are provided by the context.
 MiCasaContext getContext()
          Returns a reference to the context in effect for this client.
 void init(MiCasaFrame frame)
          Initializes a new client and provides it with a frame in which to display everything.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_ctx

protected MiCasaContext _ctx

_frame

protected MiCasaFrame _frame

_config

protected Config _config

_client

protected Client _client

_locdir

protected LocationDirector _locdir

_occdir

protected OccupantDirector _occdir

_chatdir

protected ChatDirector _chatdir

_pardtr

protected ParlorDirector _pardtr

_msgmgr

protected MessageManager _msgmgr

MESSAGE_MANAGER_PREFIX

protected static final String MESSAGE_MANAGER_PREFIX
The prefix prepended to localization bundle names before looking them up in the classpath.

See Also:
Constant Field Values
Constructor Detail

MiCasaClient

public MiCasaClient()
Method Detail

init

public void init(MiCasaFrame frame)
          throws IOException
Initializes a new client and provides it with a frame in which to display everything.

Throws:
IOException

getContext

public MiCasaContext getContext()
Returns a reference to the context in effect for this client. This reference is valid for the lifetime of the application.


createContextImpl

protected MiCasaContext createContextImpl()
Creates the MiCasaContext implementation that will be passed around to all of the client code. Derived classes may wish to override this and create some extended context implementation.


createContextServices

protected void createContextServices()
                              throws IOException
Creates and initializes the various services that are provided by the context. Derived classes that provide an extended context should override this method and create their own extended services. They should be sure to call super.createContextServices.

Throws:
IOException