Moved configuration fiddling into config object.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1402 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: PresentsConfig.java,v 1.1 2002/03/28 22:32:32 mdb Exp $
|
||||
// $Id: PresentsConfig.java,v 1.2 2002/05/28 22:25:44 mdb Exp $
|
||||
|
||||
package com.threerings.presents.server;
|
||||
|
||||
@@ -12,4 +12,16 @@ public class PresentsConfig
|
||||
{
|
||||
/** Provides access to configuration data for this package. */
|
||||
public static Config config = new Config("rsrc/config/presents/server");
|
||||
|
||||
/**
|
||||
* Returns the list of invocation service providers to be registered
|
||||
* at server startup.
|
||||
*/
|
||||
public static String[] getProviders ()
|
||||
{
|
||||
return config.getValue(PROVIDERS_KEY, (String[])null);
|
||||
}
|
||||
|
||||
/** The config key for our list of invocation provider mappings. */
|
||||
protected final static String PROVIDERS_KEY = "providers";
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: PresentsServer.java,v 1.20 2002/03/28 23:59:33 mdb Exp $
|
||||
// $Id: PresentsServer.java,v 1.21 2002/05/28 22:25:44 mdb Exp $
|
||||
|
||||
package com.threerings.presents.server;
|
||||
|
||||
@@ -64,9 +64,7 @@ public class PresentsServer
|
||||
invmgr = new InvocationManager(omgr);
|
||||
|
||||
// register our invocation service providers
|
||||
String[] providers = null;
|
||||
providers = PresentsConfig.config.getValue(PROVIDERS_KEY, providers);
|
||||
registerProviders(providers);
|
||||
registerProviders(PresentsConfig.getProviders());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -173,7 +171,4 @@ public class PresentsServer
|
||||
Log.logStackTrace(e);
|
||||
}
|
||||
}
|
||||
|
||||
// the config key for our list of invocation provider mappings
|
||||
protected final static String PROVIDERS_KEY = "providers";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user