Provide a Module for the StageServer.

git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@615 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
Michael Bayne
2008-06-08 10:49:49 +00:00
parent 0a2b8b8f52
commit b6bf735bba
@@ -35,14 +35,21 @@ import com.threerings.stage.data.StageCodes;
import static com.threerings.stage.Log.log; import static com.threerings.stage.Log.log;
/** /**
* Extends the Whirled server to provide services needed by the Stage * Extends the Whirled server to provide services needed by the Stage system.
* system.
*/ */
public abstract class StageServer extends WhirledServer public abstract class StageServer extends WhirledServer
{ {
/** A resource manager with which we can load resources in the same /** Configures dependencies needed by the Stage services. */
* manner that the client does (for resources that are used on both public static class Module extends WhirledServer.Module
* the server and client). */ {
@Override protected void configure () {
super.configure();
// nada (yet)
}
}
/** A resource manager with which we can load resources in the same manner that the client does
* (for resources that are used on both the server and client). */
public ResourceManager rsrcmgr; public ResourceManager rsrcmgr;
/** Provides access to our tile repository. */ /** Provides access to our tile repository. */
@@ -61,17 +68,15 @@ public abstract class StageServer extends WhirledServer
// create our tile manager and repository // create our tile manager and repository
tilemgr = new TileManager(null); tilemgr = new TileManager(null);
tilemgr.setTileSetRepository( tilemgr.setTileSetRepository(
new BundledTileSetRepository(rsrcmgr, null, new BundledTileSetRepository(rsrcmgr, null, StageCodes.TILESET_RSRC_SET));
StageCodes.TILESET_RSRC_SET));
log.info("Stage server initialized."); log.info("Stage server initialized.");
} }
/** /**
* Returns the path to the configuration file for the resource manager that * Returns the path to the configuration file for the resource manager that will be created for
* will be created for use by the server. This is a resource path (meaning * use by the server. This is a resource path (meaning it should be relative to the resource
* it should be relative to the resource prefix (which is * prefix (which is <code>rsrc</code>).
* <code>rsrc</code>).
*/ */
protected String getResourceConfig () protected String getResourceConfig ()
{ {