- Adding support for booting players from a table
- Apparently genservice hasn't been run in a while, so half of vilya just got poked git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@709 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
@@ -26,6 +26,7 @@ import com.threerings.parlor.data.TableMarshaller;
|
||||
import com.threerings.parlor.game.data.GameConfig;
|
||||
import com.threerings.presents.client.InvocationService;
|
||||
import com.threerings.presents.data.ClientObject;
|
||||
import com.threerings.presents.data.InvocationMarshaller;
|
||||
import com.threerings.presents.server.InvocationDispatcher;
|
||||
import com.threerings.presents.server.InvocationException;
|
||||
|
||||
@@ -49,33 +50,45 @@ public class TableDispatcher extends InvocationDispatcher<TableMarshaller>
|
||||
return new TableMarshaller();
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override // documentation inherited
|
||||
public void dispatchRequest (
|
||||
ClientObject source, int methodId, Object[] args)
|
||||
throws InvocationException
|
||||
{
|
||||
switch (methodId) {
|
||||
case TableMarshaller.BOOT_PLAYER:
|
||||
((TableProvider)provider).bootPlayer(
|
||||
source,
|
||||
((Integer)args[0]).intValue(), ((Integer)args[1]).intValue(), (InvocationService.InvocationListener)args[2]
|
||||
);
|
||||
return;
|
||||
|
||||
case TableMarshaller.CREATE_TABLE:
|
||||
((TableProvider)provider).createTable(
|
||||
source, (TableConfig)args[0], (GameConfig)args[1], (InvocationService.ResultListener)args[2]
|
||||
source,
|
||||
(TableConfig)args[0], (GameConfig)args[1], (InvocationService.ResultListener)args[2]
|
||||
);
|
||||
return;
|
||||
|
||||
case TableMarshaller.JOIN_TABLE:
|
||||
((TableProvider)provider).joinTable(
|
||||
source, ((Integer)args[0]).intValue(), ((Integer)args[1]).intValue(), (InvocationService.InvocationListener)args[2]
|
||||
source,
|
||||
((Integer)args[0]).intValue(), ((Integer)args[1]).intValue(), (InvocationService.InvocationListener)args[2]
|
||||
);
|
||||
return;
|
||||
|
||||
case TableMarshaller.LEAVE_TABLE:
|
||||
((TableProvider)provider).leaveTable(
|
||||
source, ((Integer)args[0]).intValue(), (InvocationService.InvocationListener)args[1]
|
||||
source,
|
||||
((Integer)args[0]).intValue(), (InvocationService.InvocationListener)args[1]
|
||||
);
|
||||
return;
|
||||
|
||||
case TableMarshaller.START_TABLE_NOW:
|
||||
((TableProvider)provider).startTableNow(
|
||||
source, ((Integer)args[0]).intValue(), (InvocationService.InvocationListener)args[1]
|
||||
source,
|
||||
((Integer)args[0]).intValue(), (InvocationService.InvocationListener)args[1]
|
||||
);
|
||||
return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user