public class TableManager extends Object implements ParlorCodes, TableProvider
ALREADY_AT_TABLE, BANNED_FROM_TABLE, GAME_ALREADY_STARTED, INVALID_TABLE_POSITION, INVITATION_ACCEPTED, INVITATION_COUNTERED, INVITATION_REFUSED, INVITEE_NOT_ONLINE, MUST_BE_CREATOR, NO_SELF_BOOT, NO_SUCH_TABLE, NOT_AT_TABLE, PARLOR_GROUP, TABLE_POSITION_OCCUPIED| Constructor and Description |
|---|
TableManager(com.threerings.presents.dobj.RootDObjectManager omgr,
com.threerings.presents.server.InvocationManager invmgr,
com.threerings.crowd.server.PlaceRegistry plreg,
com.threerings.presents.dobj.DObject tableObject)
Creates a table manager that will manage tables in the supplied distributed object (which
must implement
TableLobbyObject. |
| Modifier and Type | Method and Description |
|---|---|
void |
bootPlayer(com.threerings.presents.data.ClientObject caller,
int tableId,
com.threerings.util.Name target,
com.threerings.presents.client.InvocationService.InvocationListener listener)
|
Table |
createTable(com.threerings.crowd.data.BodyObject creator,
TableConfig tableConfig,
GameConfig config)
Creates a table for the specified creator and returns said table.
|
void |
createTable(com.threerings.presents.data.ClientObject caller,
TableConfig tableConfig,
GameConfig config,
com.threerings.presents.client.InvocationService.ResultListener listener)
|
int |
getTableCount()
Returns the number of tables being managed currently.
|
void |
joinTable(com.threerings.presents.data.ClientObject caller,
int tableId,
int position,
com.threerings.presents.client.InvocationService.InvocationListener listener)
|
void |
leaveTable(com.threerings.presents.data.ClientObject caller,
int tableId,
com.threerings.presents.client.InvocationService.InvocationListener listener)
|
void |
setAllowBooting(boolean allowBooting)
Allow a player in the first position of a table to boot others.
|
void |
setTableClass(Class<? extends Table> tableClass)
Set the subclass of Table that this instance should generate.
|
void |
setTableObject(com.threerings.presents.dobj.DObject tableObject)
Initialize the TableLobbyObject.
|
void |
shutdown()
This must be called when the table manager is no longer needed.
|
void |
startTableNow(com.threerings.presents.data.ClientObject caller,
int tableId,
com.threerings.presents.client.InvocationService.InvocationListener listener)
|
public TableManager(com.threerings.presents.dobj.RootDObjectManager omgr,
com.threerings.presents.server.InvocationManager invmgr,
com.threerings.crowd.server.PlaceRegistry plreg,
com.threerings.presents.dobj.DObject tableObject)
TableLobbyObject.public void setTableObject(com.threerings.presents.dobj.DObject tableObject)
public int getTableCount()
public void shutdown()
public void setTableClass(Class<? extends Table> tableClass)
public void setAllowBooting(boolean allowBooting)
public Table createTable(com.threerings.crowd.data.BodyObject creator, TableConfig tableConfig, GameConfig config) throws com.threerings.presents.server.InvocationException
com.threerings.presents.server.InvocationException - thrown if the table could not be created for any reason.public void createTable(com.threerings.presents.data.ClientObject caller,
TableConfig tableConfig,
GameConfig config,
com.threerings.presents.client.InvocationService.ResultListener listener)
throws com.threerings.presents.server.InvocationException
TableProvidercreateTable in interface TableProvidercom.threerings.presents.server.InvocationExceptionpublic void joinTable(com.threerings.presents.data.ClientObject caller,
int tableId,
int position,
com.threerings.presents.client.InvocationService.InvocationListener listener)
throws com.threerings.presents.server.InvocationException
TableProviderTableService.joinTable(int, int, com.threerings.presents.client.InvocationService.InvocationListener) request.joinTable in interface TableProvidercom.threerings.presents.server.InvocationExceptionpublic void leaveTable(com.threerings.presents.data.ClientObject caller,
int tableId,
com.threerings.presents.client.InvocationService.InvocationListener listener)
throws com.threerings.presents.server.InvocationException
TableProviderTableService.leaveTable(int, com.threerings.presents.client.InvocationService.InvocationListener) request.leaveTable in interface TableProvidercom.threerings.presents.server.InvocationExceptionpublic void startTableNow(com.threerings.presents.data.ClientObject caller,
int tableId,
com.threerings.presents.client.InvocationService.InvocationListener listener)
throws com.threerings.presents.server.InvocationException
TableProviderTableService.startTableNow(int, com.threerings.presents.client.InvocationService.InvocationListener) request.startTableNow in interface TableProvidercom.threerings.presents.server.InvocationExceptionpublic void bootPlayer(com.threerings.presents.data.ClientObject caller,
int tableId,
com.threerings.util.Name target,
com.threerings.presents.client.InvocationService.InvocationListener listener)
throws com.threerings.presents.server.InvocationException
TableProviderTableService.bootPlayer(int, com.threerings.util.Name, com.threerings.presents.client.InvocationService.InvocationListener) request.bootPlayer in interface TableProvidercom.threerings.presents.server.InvocationExceptionCopyright © 2015. All rights reserved.