Files
nenya/tests/src/java/com/threerings/jme/server/JabberServer.java
T
Michael Bayne 8fc55ee79b A bunch of Eclipse facilitated cleanup.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@734 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-12-09 02:00:28 +00:00

47 lines
1.2 KiB
Java

//
// $Id$
package com.threerings.jme.server;
import com.google.inject.Guice;
import com.google.inject.Injector;
import com.threerings.crowd.server.CrowdServer;
import com.threerings.crowd.server.PlaceManager;
import com.threerings.jme.data.JabberConfig;
import static com.threerings.crowd.Log.log;
/**
* 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
{
@Override // from CrowdServer
public void init (Injector injector)
throws Exception
{
super.init(injector);
// create a single location
_place = _plreg.createPlace(new JabberConfig());
log.info("Created chat room " + _place.where() + ".");
}
public static void main (String[] args)
{
Injector injector = Guice.createInjector(new Module());
JabberServer server = injector.getInstance(JabberServer.class);
try {
server.init(injector);
server.run();
} catch (Exception e) {
log.warning("Unable to initialize server.", e);
}
}
protected PlaceManager _place;
}