Brought things into line with new streaming world order.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1607 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,20 +1,15 @@
|
||||
//
|
||||
// $Id: Lobby.java,v 1.3 2002/02/01 23:43:45 mdb Exp $
|
||||
// $Id: Lobby.java,v 1.4 2002/07/23 05:54:52 mdb Exp $
|
||||
|
||||
package com.threerings.micasa.lobby;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.DataInputStream;
|
||||
import java.io.DataOutputStream;
|
||||
|
||||
import com.threerings.presents.io.Marshaller;
|
||||
import com.threerings.presents.io.Streamable;
|
||||
import com.threerings.io.SimpleStreamableObject;
|
||||
|
||||
/**
|
||||
* A simple class for keeping track of information for each lobby in
|
||||
* operation on the server.
|
||||
*/
|
||||
public class Lobby implements Streamable
|
||||
public class Lobby extends SimpleStreamableObject
|
||||
{
|
||||
/** The object id of the lobby place object. */
|
||||
public int placeOid;
|
||||
@@ -43,24 +38,4 @@ public class Lobby implements Streamable
|
||||
public Lobby ()
|
||||
{
|
||||
}
|
||||
|
||||
// documentation inherited
|
||||
public void writeTo (DataOutputStream out)
|
||||
throws IOException
|
||||
{
|
||||
Marshaller.writeObject(out, this);
|
||||
}
|
||||
|
||||
// documentation inherited
|
||||
public void readFrom (DataInputStream in)
|
||||
throws IOException
|
||||
{
|
||||
Marshaller.readObject(in, this);
|
||||
}
|
||||
|
||||
public String toString ()
|
||||
{
|
||||
return "[oid=" + placeOid + ", ident=" + gameIdent +
|
||||
", name=" + name + "]";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
//
|
||||
// $Id: LobbyConfig.java,v 1.5 2001/10/23 20:24:10 mdb Exp $
|
||||
// $Id: LobbyConfig.java,v 1.6 2002/07/23 05:54:52 mdb Exp $
|
||||
|
||||
package com.threerings.micasa.lobby;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.DataInputStream;
|
||||
import java.io.DataOutputStream;
|
||||
|
||||
import javax.swing.JComponent;
|
||||
import javax.swing.JLabel;
|
||||
@@ -13,6 +11,9 @@ import javax.swing.JLabel;
|
||||
import java.util.Properties;
|
||||
import com.samskivert.util.StringUtil;
|
||||
|
||||
import com.threerings.io.ObjectInputStream;
|
||||
import com.threerings.io.ObjectOutputStream;
|
||||
|
||||
import com.threerings.crowd.data.PlaceConfig;
|
||||
import com.threerings.parlor.game.GameConfig;
|
||||
import com.threerings.micasa.util.MiCasaContext;
|
||||
@@ -64,19 +65,23 @@ public class LobbyConfig extends PlaceConfig
|
||||
_gameConfigClass = getConfigValue(config, "game_config");
|
||||
}
|
||||
|
||||
// documentation inherited
|
||||
public void writeTo (DataOutputStream out)
|
||||
/**
|
||||
* Writes our custom streamable fields.
|
||||
*/
|
||||
public void writeObject (ObjectOutputStream out)
|
||||
throws IOException
|
||||
{
|
||||
super.writeTo(out);
|
||||
out.defaultWriteObject();
|
||||
out.writeUTF(_gameConfigClass);
|
||||
}
|
||||
|
||||
// documentation inherited
|
||||
public void readFrom (DataInputStream in)
|
||||
throws IOException
|
||||
/**
|
||||
* Reads our custom streamable fields.
|
||||
*/
|
||||
public void readObject (ObjectInputStream in)
|
||||
throws IOException, ClassNotFoundException
|
||||
{
|
||||
super.readFrom(in);
|
||||
in.defaultReadObject();
|
||||
_gameConfigClass = in.readUTF();
|
||||
}
|
||||
|
||||
@@ -84,7 +89,10 @@ public class LobbyConfig extends PlaceConfig
|
||||
protected void toString (StringBuffer buf)
|
||||
{
|
||||
super.toString(buf);
|
||||
buf.append(", game_config=").append(_gameConfigClass);
|
||||
if (buf.length() > 1) {
|
||||
buf.append(", ");
|
||||
}
|
||||
buf.append("game_config=").append(_gameConfigClass);
|
||||
}
|
||||
|
||||
/** Looks up a configuration property in the supplied properties
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
//
|
||||
// $Id: LobbyProvider.java,v 1.3 2001/10/11 04:13:33 mdb Exp $
|
||||
// $Id: LobbyProvider.java,v 1.4 2002/07/23 05:54:52 mdb Exp $
|
||||
|
||||
package com.threerings.micasa.lobby;
|
||||
|
||||
import com.threerings.presents.server.InvocationProvider;
|
||||
import com.threerings.presents.util.StreamableArrayList;
|
||||
import com.threerings.crowd.data.BodyObject;
|
||||
import com.threerings.presents.server.InvocationProvider;
|
||||
import com.threerings.util.StreamableArrayList;
|
||||
|
||||
/**
|
||||
* Handles server side of lobby-related invocation services.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: TableLobbyObject.dobj,v 1.2 2002/02/08 23:55:24 mdb Exp $
|
||||
// $Id: TableLobbyObject.dobj,v 1.3 2002/07/23 05:54:52 mdb Exp $
|
||||
|
||||
package com.threerings.micasa.lobby.table;
|
||||
|
||||
@@ -12,7 +12,7 @@ public class TableLobbyObject
|
||||
implements com.threerings.parlor.data.TableLobbyObject
|
||||
{
|
||||
/** A set containing all of the tables being managed by this lobby. */
|
||||
public DSet tableSet = new DSet(Table.class);
|
||||
public DSet tableSet = new DSet();
|
||||
|
||||
// documentation inherited
|
||||
public DSet getTables ()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: TableLobbyObject.java,v 1.4 2002/03/18 23:21:26 mdb Exp $
|
||||
// $Id: TableLobbyObject.java,v 1.5 2002/07/23 05:54:52 mdb Exp $
|
||||
|
||||
package com.threerings.micasa.lobby.table;
|
||||
|
||||
@@ -15,7 +15,7 @@ public class TableLobbyObject
|
||||
public static final String TABLE_SET = "tableSet";
|
||||
|
||||
/** A set containing all of the tables being managed by this lobby. */
|
||||
public DSet tableSet = new DSet(Table.class);
|
||||
public DSet tableSet = new DSet();
|
||||
|
||||
// documentation inherited
|
||||
public DSet getTables ()
|
||||
|
||||
Reference in New Issue
Block a user