8fc55ee79b
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@734 ed5b42cb-e716-0410-a449-f6a68f950b19
47 lines
1.2 KiB
Java
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;
|
|
}
|