Har! More progress mateys.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2001-05-29 03:27:59 +00:00
parent 6717f8d6e5
commit 33d93d3374
26 changed files with 947 additions and 124 deletions
@@ -0,0 +1,64 @@
//
// $Id: PresentsServer.java,v 1.1 2001/05/29 03:27:59 mdb Exp $
package com.samskivert.cocktail.cher.server;
import com.samskivert.cocktail.cher.Log;
import com.samskivert.cocktail.cher.server.net.AuthManager;
import com.samskivert.cocktail.cher.server.net.ConnectionManager;
/**
* The cher server provides a central point of access to the various
* facilities that make up the cher layer of the system.
*/
public class CherServer
{
/** The authentication manager. */
public static AuthManager authmgr;
/** The manager of network connections. */
public static ConnectionManager cmgr;
/**
* Initializes all of the server services and prepares for operation.
*/
public static void init ()
{
try {
// create our authentication manager
authmgr = new AuthManager(new DummyAuthenticator());
// create our connection manager
cmgr = new ConnectionManager(authmgr);
} catch (Exception e) {
Log.warning("Unable to initialize server.");
Log.logStackTrace(e);
}
}
/**
* Starts up all of the server services and enters the main server
* event loop.
*/
public static void start ()
{
// start up the auth manager
authmgr.start();
// start up the connection manager
cmgr.start();
// for now, just block because we've nothing to do
try {
synchronized (CherServer.class) {
CherServer.class.wait();
}
} catch (InterruptedException ie) {
}
}
public static void main (String[] args)
{
init();
start();
}
}