com.threerings.admin.client
Class ConfigObjectManager

java.lang.Object
  extended by com.threerings.admin.client.ConfigObjectManager
All Implemented Interfaces:
AdminService.ConfigInfoListener, InvocationService.InvocationListener

public class ConfigObjectManager
extends Object
implements AdminService.ConfigInfoListener

Handles subscribing to admin config objects.


Nested Class Summary
protected  class ConfigObjectManager.ConfigObjectSubscriber
          This class takes care of the details of subscribing to and placing an individual ConfigObject that the server knows about into a HashMap.
 
Field Summary
protected  Client _client
          Our client object.
protected  ConfigObjectManager.ConfigObjectSubscriber[] _csubscribers
          An array of handlers that each subscribe to a single ConfigObject.
protected  DObjectManager _dobjmgr
          Our distributed object manager.
protected  HashMap<String,ConfigObject> _serverconfig
          Our local copy of the server-side runtime configuration.
protected  AdminService _service
          Our admin service that we're using to fetch data.
 
Constructor Summary
ConfigObjectManager(Client client)
           
 
Method Summary
protected  void getConfigInfo()
          Convenience: generate a getConfigInfo request to the AdminService from the external class, instead from within the anonymous inner class.
 ConfigObject getServerConfig(String key)
          Returns the ConfigObject identified by the given key.
 void gotConfigInfo(String[] keys, int[] oids)
          Delivers a successful response to a AdminService.getConfigInfo(com.threerings.admin.client.AdminService.ConfigInfoListener) request.
 void requestFailed(String reason)
          Called to report request failure.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_csubscribers

protected ConfigObjectManager.ConfigObjectSubscriber[] _csubscribers
An array of handlers that each subscribe to a single ConfigObject.


_serverconfig

protected HashMap<String,ConfigObject> _serverconfig
Our local copy of the server-side runtime configuration.


_dobjmgr

protected DObjectManager _dobjmgr
Our distributed object manager.


_service

protected AdminService _service
Our admin service that we're using to fetch data.


_client

protected Client _client
Our client object.

Constructor Detail

ConfigObjectManager

public ConfigObjectManager(Client client)
Method Detail

getServerConfig

public ConfigObject getServerConfig(String key)
Returns the ConfigObject identified by the given key.


gotConfigInfo

public void gotConfigInfo(String[] keys,
                          int[] oids)
Description copied from interface: AdminService.ConfigInfoListener
Delivers a successful response to a AdminService.getConfigInfo(com.threerings.admin.client.AdminService.ConfigInfoListener) request.

Specified by:
gotConfigInfo in interface AdminService.ConfigInfoListener

requestFailed

public void requestFailed(String reason)
Description copied from interface: InvocationService.InvocationListener
Called to report request failure. If the invocation services system detects failure of any kind, it will report it via this callback. Particular services may also make use of this callback to report failures of their own, or they may opt to define more specific failure callbacks.

Specified by:
requestFailed in interface InvocationService.InvocationListener

getConfigInfo

protected void getConfigInfo()
Convenience: generate a getConfigInfo request to the AdminService from the external class, instead from within the anonymous inner class.