Behold, Nenya, Ring of Water and repository for our media and animation related
goodies, both Java 2D and LWJGL/JME 3D. git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@1 ed5b42cb-e716-0410-a449-f6a68f950b19
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
//
|
||||
// $Id$
|
||||
|
||||
package com.threerings.jme.server;
|
||||
|
||||
import com.threerings.crowd.Log;
|
||||
import com.threerings.crowd.data.PlaceObject;
|
||||
import com.threerings.crowd.server.CrowdServer;
|
||||
import com.threerings.crowd.server.PlaceManager;
|
||||
import com.threerings.crowd.server.PlaceRegistry;
|
||||
|
||||
import com.threerings.jme.data.JabberConfig;
|
||||
|
||||
/**
|
||||
* A basic server that creates a single room and sticks everyone in it
|
||||
* where they can chat with one another.
|
||||
*/
|
||||
public class JabberServer extends CrowdServer
|
||||
{
|
||||
// documentation inherited
|
||||
public void init ()
|
||||
throws Exception
|
||||
{
|
||||
super.init();
|
||||
|
||||
// create a single location
|
||||
plreg.createPlace(
|
||||
new JabberConfig(), new PlaceRegistry.CreationObserver() {
|
||||
public void placeCreated (PlaceObject place, PlaceManager pmgr) {
|
||||
Log.info("Created chat room " + pmgr.where() + ".");
|
||||
_place = pmgr;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public static void main (String[] args)
|
||||
{
|
||||
JabberServer server = new JabberServer();
|
||||
try {
|
||||
server.init();
|
||||
server.run();
|
||||
} catch (Exception e) {
|
||||
Log.warning("Unable to initialize server.");
|
||||
Log.logStackTrace(e);
|
||||
}
|
||||
}
|
||||
|
||||
protected PlaceManager _place;
|
||||
}
|
||||
Reference in New Issue
Block a user