Yay for rabbit holes. Revamped the table services to decouple them from places.
While I was in there, I extracted the communication between the client and the TableManager into a new-style "embedded in the TableLobbyObject" service instead of wonkily routing everything through the global ParlorService and the ParlorProvider (which got merged into the ParlorManager as a part of this rabbit holery). The GG build will break... I will fix it. git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@255 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
@@ -27,8 +27,7 @@ import com.threerings.parlor.server.TableManagerProvider;
|
||||
import com.threerings.micasa.lobby.LobbyManager;
|
||||
|
||||
/**
|
||||
* Extends lobby manager only to ensure that a table lobby object is used
|
||||
* for table lobbies.
|
||||
* Extends lobby manager only to ensure that a table lobby object is used for table lobbies.
|
||||
*/
|
||||
public class TableLobbyManager
|
||||
extends LobbyManager implements TableManagerProvider
|
||||
@@ -37,10 +36,8 @@ public class TableLobbyManager
|
||||
protected void didStartup ()
|
||||
{
|
||||
super.didStartup();
|
||||
|
||||
// now that we have our place object, we can create our table
|
||||
// manager
|
||||
_tmgr = new TableManager(this);
|
||||
// now that we have our place object, we can create our table manager
|
||||
_tmgr = new TableManager(getPlaceObject());
|
||||
}
|
||||
|
||||
// documentation inherited
|
||||
|
||||
@@ -21,46 +21,59 @@
|
||||
|
||||
package com.threerings.micasa.lobby.table;
|
||||
|
||||
import com.threerings.presents.dobj.DSet;
|
||||
import com.threerings.parlor.data.Table;
|
||||
import com.threerings.parlor.data.TableMarshaller;
|
||||
import com.threerings.presents.dobj.DSet;
|
||||
|
||||
import com.threerings.micasa.lobby.LobbyObject;
|
||||
|
||||
public class TableLobbyObject
|
||||
extends LobbyObject
|
||||
public class TableLobbyObject extends LobbyObject
|
||||
implements com.threerings.parlor.data.TableLobbyObject
|
||||
{
|
||||
// AUTO-GENERATED: FIELDS START
|
||||
/** The field name of the <code>tableSet</code> field. */
|
||||
public static final String TABLE_SET = "tableSet";
|
||||
|
||||
/** The field name of the <code>tableService</code> field. */
|
||||
public static final String TABLE_SERVICE = "tableService";
|
||||
// AUTO-GENERATED: FIELDS END
|
||||
|
||||
/** A set containing all of the tables being managed by this lobby. */
|
||||
public DSet tableSet = new DSet();
|
||||
|
||||
// documentation inherited
|
||||
/** Handles our table services. */
|
||||
public TableMarshaller tableService;
|
||||
|
||||
// from interface TableLobbyObject
|
||||
public DSet getTables ()
|
||||
{
|
||||
return tableSet;
|
||||
}
|
||||
|
||||
// documentation inherited from interface
|
||||
// from interface TableLobbyObject
|
||||
public void addToTables (Table table)
|
||||
{
|
||||
addToTableSet(table);
|
||||
}
|
||||
|
||||
// documentation inherited from interface
|
||||
// from interface TableLobbyObject
|
||||
public void updateTables (Table table)
|
||||
{
|
||||
updateTableSet(table);
|
||||
}
|
||||
|
||||
// documentation inherited from interface
|
||||
// from interface TableLobbyObject
|
||||
public void removeFromTables (Comparable key)
|
||||
{
|
||||
removeFromTableSet(key);
|
||||
}
|
||||
|
||||
// from interface TableLobbyObject
|
||||
public TableMarshaller getTableService ()
|
||||
{
|
||||
return tableService;
|
||||
}
|
||||
|
||||
// AUTO-GENERATED: METHODS START
|
||||
/**
|
||||
* Requests that the specified entry be added to the
|
||||
@@ -109,5 +122,21 @@ public class TableLobbyObject
|
||||
(value == null) ? null : value.typedClone();
|
||||
this.tableSet = clone;
|
||||
}
|
||||
|
||||
/**
|
||||
* Requests that the <code>tableService</code> field be set to the
|
||||
* specified value. The local value will be updated immediately and an
|
||||
* event will be propagated through the system to notify all listeners
|
||||
* that the attribute did change. Proxied copies of this object (on
|
||||
* clients) will apply the value change when they received the
|
||||
* attribute changed notification.
|
||||
*/
|
||||
public void setTableService (TableMarshaller value)
|
||||
{
|
||||
TableMarshaller ovalue = this.tableService;
|
||||
requestAttributeChange(
|
||||
TABLE_SERVICE, value, ovalue);
|
||||
this.tableService = value;
|
||||
}
|
||||
// AUTO-GENERATED: METHODS END
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user