Updated to conform to new place services provided by party. Getting closer
to being able to launch a game. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@406 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
//
|
||||
// $Id: LobbyConfig.java,v 1.1 2001/10/09 00:48:34 mdb Exp $
|
||||
|
||||
package com.threerings.micasa.lobby;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.DataInputStream;
|
||||
import java.io.DataOutputStream;
|
||||
|
||||
import com.threerings.cocktail.party.data.PlaceConfig;
|
||||
|
||||
public class LobbyConfig extends PlaceConfig
|
||||
{
|
||||
// documentation inherited
|
||||
public Class getControllerClass ()
|
||||
{
|
||||
return LobbyController.class;
|
||||
}
|
||||
|
||||
// documentation inherited
|
||||
public String getManagerClassName ()
|
||||
{
|
||||
return "com.threerings.micasa.lobby.LobbyManager";
|
||||
}
|
||||
|
||||
// documentation inherited
|
||||
public void writeTo (DataOutputStream out)
|
||||
throws IOException
|
||||
{
|
||||
super.writeTo(out);
|
||||
}
|
||||
|
||||
// documentation inherited
|
||||
public void readFrom (DataInputStream in)
|
||||
throws IOException
|
||||
{
|
||||
super.readFrom(in);
|
||||
}
|
||||
|
||||
// documentation inherited
|
||||
protected void toString (StringBuffer buf)
|
||||
{
|
||||
super.toString(buf);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
//
|
||||
// $Id: LobbyController.java,v 1.1 2001/10/09 00:48:34 mdb Exp $
|
||||
|
||||
package com.threerings.micasa.lobby;
|
||||
|
||||
import com.threerings.cocktail.party.data.PlaceConfig;
|
||||
import com.threerings.cocktail.party.client.PlaceController;
|
||||
import com.threerings.cocktail.party.client.PlaceView;
|
||||
import com.threerings.cocktail.party.util.PartyContext;
|
||||
|
||||
import com.threerings.micasa.Log;
|
||||
|
||||
public class LobbyController extends PlaceController
|
||||
{
|
||||
public void init (PartyContext ctx, PlaceConfig config)
|
||||
{
|
||||
super.init(ctx, config);
|
||||
|
||||
Log.info("Lobby controller created [config=" + config + "].");
|
||||
}
|
||||
|
||||
protected PlaceView createPlaceView ()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: LobbyRegistry.java,v 1.2 2001/10/04 23:41:44 mdb Exp $
|
||||
// $Id: LobbyRegistry.java,v 1.3 2001/10/09 00:48:34 mdb Exp $
|
||||
|
||||
package com.threerings.micasa.lobby;
|
||||
|
||||
@@ -106,15 +106,17 @@ public class LobbyRegistry implements LobbyCodes
|
||||
props = PropertiesUtil.getSubProperties(props, lobbyId);
|
||||
|
||||
// get the lobby manager class and UGI
|
||||
String lmgrClass = props.getProperty("mgrclass");
|
||||
if (StringUtil.blank(lmgrClass)) {
|
||||
throw new Exception("Missing 'mgrclass' definition in " +
|
||||
String cfgClass = props.getProperty("config");
|
||||
if (StringUtil.blank(cfgClass)) {
|
||||
throw new Exception("Missing 'config' definition in " +
|
||||
"lobby configuration.");
|
||||
}
|
||||
|
||||
// instantiate the manager class and create the lobby
|
||||
LobbyConfig config = (LobbyConfig)
|
||||
Class.forName(cfgClass).newInstance();
|
||||
LobbyManager lobmgr = (LobbyManager)
|
||||
MiCasaServer.plreg.createPlace(Class.forName(lmgrClass));
|
||||
MiCasaServer.plreg.createPlace(config);
|
||||
|
||||
// initialize the lobby manager. it will call lobbyReady()
|
||||
// when it has obtained a reference to its lobby object and is
|
||||
|
||||
Reference in New Issue
Block a user