- 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:
Bruno Garcia
2008-08-06 00:41:46 +00:00
parent 6c91e7cb96
commit 9a822fe561
47 changed files with 256 additions and 115 deletions
@@ -29,7 +29,7 @@ import com.threerings.presents.data.InvocationMarshaller;
import com.threerings.util.Integer;
/**
* Provides the implementation of the <code>TrickCardGameService</code> interface
* Provides the implementation of the {@link TrickCardGameService} interface
* that marshalls the arguments and delivers the request to the provider
* on the server. Also provides an implementation of the response listener
* interfaces that marshall the response arguments and deliver them back
@@ -38,7 +38,7 @@ import com.threerings.util.Integer;
public class TrickCardGameMarshaller extends InvocationMarshaller
implements TrickCardGameService
{
/** The method id used to dispatch <code>playCard</code> requests. */
/** The method id used to dispatch {@link #playCard} requests. */
public static const PLAY_CARD :int = 1;
// from interface TrickCardGameService
@@ -49,7 +49,7 @@ public class TrickCardGameMarshaller extends InvocationMarshaller
]);
}
/** The method id used to dispatch <code>requestRematch</code> requests. */
/** The method id used to dispatch {@link #requestRematch} requests. */
public static const REQUEST_REMATCH :int = 2;
// from interface TrickCardGameService
@@ -60,7 +60,7 @@ public class TrickCardGameMarshaller extends InvocationMarshaller
]);
}
/** The method id used to dispatch <code>sendCardsToPlayer</code> requests. */
/** The method id used to dispatch {@link #sendCardsToPlayer} requests. */
public static const SEND_CARDS_TO_PLAYER :int = 3;
// from interface TrickCardGameService
@@ -33,6 +33,9 @@ import com.threerings.presents.client.InvocationService_ResultListener;
*/
public interface TableService extends InvocationService
{
// from Java interface TableService
function bootPlayer (arg1 :Client, arg2 :int, arg3 :int, arg4 :InvocationService_InvocationListener) :void;
// from Java interface TableService
function createTable (arg1 :Client, arg2 :TableConfig, arg3 :GameConfig, arg4 :InvocationService_ResultListener) :void;
@@ -34,7 +34,7 @@ import com.threerings.util.Integer;
import com.threerings.util.Name;
/**
* Provides the implementation of the <code>ParlorService</code> interface
* Provides the implementation of the {@link ParlorService} interface
* that marshalls the arguments and delivers the request to the provider
* on the server. Also provides an implementation of the response listener
* interfaces that marshall the response arguments and deliver them back
@@ -43,7 +43,7 @@ import com.threerings.util.Name;
public class ParlorMarshaller extends InvocationMarshaller
implements ParlorService
{
/** The method id used to dispatch <code>cancel</code> requests. */
/** The method id used to dispatch {@link #cancel} requests. */
public static const CANCEL :int = 1;
// from interface ParlorService
@@ -56,7 +56,7 @@ public class ParlorMarshaller extends InvocationMarshaller
]);
}
/** The method id used to dispatch <code>invite</code> requests. */
/** The method id used to dispatch {@link #invite} requests. */
public static const INVITE :int = 2;
// from interface ParlorService
@@ -69,7 +69,7 @@ public class ParlorMarshaller extends InvocationMarshaller
]);
}
/** The method id used to dispatch <code>respond</code> requests. */
/** The method id used to dispatch {@link #respond} requests. */
public static const RESPOND :int = 3;
// from interface ParlorService
@@ -82,7 +82,7 @@ public class ParlorMarshaller extends InvocationMarshaller
]);
}
/** The method id used to dispatch <code>startSolitaire</code> requests. */
/** The method id used to dispatch {@link #startSolitaire} requests. */
public static const START_SOLITAIRE :int = 4;
// from interface ParlorService
@@ -30,7 +30,7 @@ import com.threerings.presents.data.InvocationMarshaller_ListenerMarshaller;
public class ParlorMarshaller_InviteMarshaller
extends InvocationMarshaller_ListenerMarshaller
{
/** The method id used to dispatch <code>inviteReceived</code> responses. */
/** The method id used to dispatch {@link #inviteReceived} responses. */
public static const INVITE_RECEIVED :int = 1;
// from InvocationMarshaller_ListenerMarshaller
@@ -32,7 +32,7 @@ import com.threerings.presents.data.InvocationMarshaller_ResultMarshaller;
import com.threerings.util.Integer;
/**
* Provides the implementation of the <code>TableService</code> interface
* Provides the implementation of the {@link TableService} interface
* that marshalls the arguments and delivers the request to the provider
* on the server. Also provides an implementation of the response listener
* interfaces that marshall the response arguments and deliver them back
@@ -41,8 +41,21 @@ import com.threerings.util.Integer;
public class TableMarshaller extends InvocationMarshaller
implements TableService
{
/** The method id used to dispatch <code>createTable</code> requests. */
public static const CREATE_TABLE :int = 1;
/** The method id used to dispatch {@link #bootPlayer} requests. */
public static const BOOT_PLAYER :int = 1;
// from interface TableService
public function bootPlayer (arg1 :Client, arg2 :int, arg3 :int, arg4 :InvocationService_InvocationListener) :void
{
var listener4 :InvocationMarshaller_ListenerMarshaller = new InvocationMarshaller_ListenerMarshaller();
listener4.listener = arg4;
sendRequest(arg1, BOOT_PLAYER, [
Integer.valueOf(arg2), Integer.valueOf(arg3), listener4
]);
}
/** The method id used to dispatch {@link #createTable} requests. */
public static const CREATE_TABLE :int = 2;
// from interface TableService
public function createTable (arg1 :Client, arg2 :TableConfig, arg3 :GameConfig, arg4 :InvocationService_ResultListener) :void
@@ -54,8 +67,8 @@ public class TableMarshaller extends InvocationMarshaller
]);
}
/** The method id used to dispatch <code>joinTable</code> requests. */
public static const JOIN_TABLE :int = 2;
/** The method id used to dispatch {@link #joinTable} requests. */
public static const JOIN_TABLE :int = 3;
// from interface TableService
public function joinTable (arg1 :Client, arg2 :int, arg3 :int, arg4 :InvocationService_InvocationListener) :void
@@ -67,8 +80,8 @@ public class TableMarshaller extends InvocationMarshaller
]);
}
/** The method id used to dispatch <code>leaveTable</code> requests. */
public static const LEAVE_TABLE :int = 3;
/** The method id used to dispatch {@link #leaveTable} requests. */
public static const LEAVE_TABLE :int = 4;
// from interface TableService
public function leaveTable (arg1 :Client, arg2 :int, arg3 :InvocationService_InvocationListener) :void
@@ -80,8 +93,8 @@ public class TableMarshaller extends InvocationMarshaller
]);
}
/** The method id used to dispatch <code>startTableNow</code> requests. */
public static const START_TABLE_NOW :int = 4;
/** The method id used to dispatch {@link #startTableNow} requests. */
public static const START_TABLE_NOW :int = 5;
// from interface TableService
public function startTableNow (arg1 :Client, arg2 :int, arg3 :InvocationService_InvocationListener) :void
@@ -28,7 +28,7 @@ import com.threerings.whirled.client.SceneService;
import com.threerings.whirled.client.SceneService_SceneMoveListener;
/**
* Provides the implementation of the <code>SceneService</code> interface
* Provides the implementation of the {@link SceneService} interface
* that marshalls the arguments and delivers the request to the provider
* on the server. Also provides an implementation of the response listener
* interfaces that marshall the response arguments and deliver them back
@@ -37,7 +37,7 @@ import com.threerings.whirled.client.SceneService_SceneMoveListener;
public class SceneMarshaller extends InvocationMarshaller
implements SceneService
{
/** The method id used to dispatch <code>moveTo</code> requests. */
/** The method id used to dispatch {@link #moveTo} requests. */
public static const MOVE_TO :int = 1;
// from interface SceneService
@@ -32,16 +32,16 @@ import com.threerings.whirled.client.SceneService_SceneMoveListener;
public class SceneMarshaller_SceneMoveMarshaller
extends InvocationMarshaller_ListenerMarshaller
{
/** The method id used to dispatch <code>moveRequiresServerSwitch</code> responses. */
/** The method id used to dispatch {@link #moveRequiresServerSwitch} responses. */
public static const MOVE_REQUIRES_SERVER_SWITCH :int = 1;
/** The method id used to dispatch <code>moveSucceeded</code> responses. */
/** The method id used to dispatch {@link #moveSucceeded} responses. */
public static const MOVE_SUCCEEDED :int = 2;
/** The method id used to dispatch <code>moveSucceededWithScene</code> responses. */
/** The method id used to dispatch {@link #moveSucceededWithScene} responses. */
public static const MOVE_SUCCEEDED_WITH_SCENE :int = 3;
/** The method id used to dispatch <code>moveSucceededWithUpdates</code> responses. */
/** The method id used to dispatch {@link #moveSucceededWithUpdates} responses. */
public static const MOVE_SUCCEEDED_WITH_UPDATES :int = 4;
// from InvocationMarshaller_ListenerMarshaller
@@ -32,7 +32,7 @@ import com.threerings.whirled.data.SceneMarshaller_SceneMoveMarshaller;
import com.threerings.whirled.spot.client.SpotService;
/**
* Provides the implementation of the <code>SpotService</code> interface
* Provides the implementation of the {@link SpotService} interface
* that marshalls the arguments and delivers the request to the provider
* on the server. Also provides an implementation of the response listener
* interfaces that marshall the response arguments and deliver them back
@@ -41,7 +41,7 @@ import com.threerings.whirled.spot.client.SpotService;
public class SpotMarshaller extends InvocationMarshaller
implements SpotService
{
/** The method id used to dispatch <code>changeLocation</code> requests. */
/** The method id used to dispatch {@link #changeLocation} requests. */
public static const CHANGE_LOCATION :int = 1;
// from interface SpotService
@@ -54,7 +54,7 @@ public class SpotMarshaller extends InvocationMarshaller
]);
}
/** The method id used to dispatch <code>clusterSpeak</code> requests. */
/** The method id used to dispatch {@link #clusterSpeak} requests. */
public static const CLUSTER_SPEAK :int = 2;
// from interface SpotService
@@ -65,7 +65,7 @@ public class SpotMarshaller extends InvocationMarshaller
]);
}
/** The method id used to dispatch <code>joinCluster</code> requests. */
/** The method id used to dispatch {@link #joinCluster} requests. */
public static const JOIN_CLUSTER :int = 3;
// from interface SpotService
@@ -78,7 +78,7 @@ public class SpotMarshaller extends InvocationMarshaller
]);
}
/** The method id used to dispatch <code>traversePortal</code> requests. */
/** The method id used to dispatch {@link #traversePortal} requests. */
public static const TRAVERSE_PORTAL :int = 4;
// from interface SpotService
@@ -28,7 +28,7 @@ import com.threerings.whirled.zone.client.ZoneService;
import com.threerings.whirled.zone.client.ZoneService_ZoneMoveListener;
/**
* Provides the implementation of the <code>ZoneService</code> interface
* Provides the implementation of the {@link ZoneService} interface
* that marshalls the arguments and delivers the request to the provider
* on the server. Also provides an implementation of the response listener
* interfaces that marshall the response arguments and deliver them back
@@ -37,7 +37,7 @@ import com.threerings.whirled.zone.client.ZoneService_ZoneMoveListener;
public class ZoneMarshaller extends InvocationMarshaller
implements ZoneService
{
/** The method id used to dispatch <code>moveTo</code> requests. */
/** The method id used to dispatch {@link #moveTo} requests. */
public static const MOVE_TO :int = 1;
// from interface ZoneService
@@ -33,13 +33,13 @@ import com.threerings.whirled.zone.client.ZoneService_ZoneMoveListener;
public class ZoneMarshaller_ZoneMoveMarshaller
extends InvocationMarshaller_ListenerMarshaller
{
/** The method id used to dispatch <code>moveSucceeded</code> responses. */
/** The method id used to dispatch {@link #moveSucceeded} responses. */
public static const MOVE_SUCCEEDED :int = 1;
/** The method id used to dispatch <code>moveSucceededWithScene</code> responses. */
/** The method id used to dispatch {@link #moveSucceededWithScene} responses. */
public static const MOVE_SUCCEEDED_WITH_SCENE :int = 2;
/** The method id used to dispatch <code>moveSucceededWithUpdates</code> responses. */
/** The method id used to dispatch {@link #moveSucceededWithUpdates} responses. */
public static const MOVE_SUCCEEDED_WITH_UPDATES :int = 3;
// from InvocationMarshaller_ListenerMarshaller
@@ -22,6 +22,7 @@
package com.threerings.micasa.lobby;
import com.threerings.presents.data.ClientObject;
import com.threerings.presents.data.InvocationMarshaller;
import com.threerings.presents.server.InvocationDispatcher;
import com.threerings.presents.server.InvocationException;
@@ -45,6 +46,7 @@ public class LobbyDispatcher extends InvocationDispatcher<LobbyMarshaller>
return new LobbyMarshaller();
}
@SuppressWarnings("unchecked")
@Override // documentation inherited
public void dispatchRequest (
ClientObject source, int methodId, Object[] args)
@@ -53,13 +55,15 @@ public class LobbyDispatcher extends InvocationDispatcher<LobbyMarshaller>
switch (methodId) {
case LobbyMarshaller.GET_CATEGORIES:
((LobbyProvider)provider).getCategories(
source, (LobbyService.CategoriesListener)args[0]
source,
(LobbyService.CategoriesListener)args[0]
);
return;
case LobbyMarshaller.GET_LOBBIES:
((LobbyProvider)provider).getLobbies(
source, (String)args[0], (LobbyService.LobbiesListener)args[1]
source,
(String)args[0], (LobbyService.LobbiesListener)args[1]
);
return;
@@ -24,6 +24,7 @@ package com.threerings.micasa.lobby;
import com.threerings.presents.client.Client;
import com.threerings.presents.data.InvocationMarshaller;
import com.threerings.presents.dobj.InvocationResponseEvent;
import com.threerings.presents.net.Transport;
import java.util.List;
/**
@@ -37,7 +38,7 @@ public class LobbyMarshaller extends InvocationMarshaller
implements LobbyService
{
/**
* Marshalls results to implementations of {@link LobbyService.CategoriesListener}.
* Marshalls results to implementations of {@link CategoriesListener}.
*/
public static class CategoriesMarshaller extends ListenerMarshaller
implements CategoriesListener
@@ -72,7 +73,7 @@ public class LobbyMarshaller extends InvocationMarshaller
}
/**
* Marshalls results to implementations of {@link LobbyService.LobbiesListener}.
* Marshalls results to implementations of {@link LobbiesListener}.
*/
public static class LobbiesMarshaller extends ListenerMarshaller
implements LobbiesListener
@@ -82,7 +83,7 @@ public class LobbyMarshaller extends InvocationMarshaller
public static final int GOT_LOBBIES = 1;
// from interface LobbiesMarshaller
public void gotLobbies (List<Lobby> arg1)
public void gotLobbies (List<com.threerings.micasa.lobby.Lobby> arg1)
{
_invId = null;
omgr.postEvent(new InvocationResponseEvent(
@@ -91,13 +92,12 @@ public class LobbyMarshaller extends InvocationMarshaller
}
@Override // from InvocationMarshaller
@SuppressWarnings("unchecked")
public void dispatchResponse (int methodId, Object[] args)
{
switch (methodId) {
case GOT_LOBBIES:
((LobbiesListener)listener).gotLobbies(
(List<Lobby>)args[0]);
(List<com.threerings.micasa.lobby.Lobby>)args[0]);
return;
default:
@@ -33,12 +33,12 @@ public interface LobbyProvider extends InvocationProvider
/**
* Handles a {@link LobbyService#getCategories} request.
*/
void getCategories (ClientObject caller, LobbyService.CategoriesListener arg1)
public void getCategories (ClientObject caller, LobbyService.CategoriesListener arg1)
throws InvocationException;
/**
* Handles a {@link LobbyService#getLobbies} request.
*/
void getLobbies (ClientObject caller, String arg1, LobbyService.LobbiesListener arg2)
public void getLobbies (ClientObject caller, String arg1, LobbyService.LobbiesListener arg2)
throws InvocationException;
}
@@ -25,6 +25,7 @@ import com.threerings.micasa.simulator.client.SimulatorService;
import com.threerings.parlor.game.data.GameConfig;
import com.threerings.presents.client.Client;
import com.threerings.presents.data.InvocationMarshaller;
import com.threerings.presents.net.Transport;
/**
* Provides the implementation of the {@link SimulatorService} interface
@@ -24,6 +24,7 @@ package com.threerings.micasa.simulator.server;
import com.threerings.micasa.simulator.data.SimulatorMarshaller;
import com.threerings.parlor.game.data.GameConfig;
import com.threerings.presents.data.ClientObject;
import com.threerings.presents.data.InvocationMarshaller;
import com.threerings.presents.server.InvocationDispatcher;
import com.threerings.presents.server.InvocationException;
@@ -47,6 +48,7 @@ public class SimulatorDispatcher extends InvocationDispatcher<SimulatorMarshalle
return new SimulatorMarshaller();
}
@SuppressWarnings("unchecked")
@Override // documentation inherited
public void dispatchRequest (
ClientObject source, int methodId, Object[] args)
@@ -55,7 +57,8 @@ public class SimulatorDispatcher extends InvocationDispatcher<SimulatorMarshalle
switch (methodId) {
case SimulatorMarshaller.CREATE_GAME:
((SimulatorProvider)provider).createGame(
source, (GameConfig)args[0], (String)args[1], ((Integer)args[2]).intValue()
source,
(GameConfig)args[0], (String)args[1], ((Integer)args[2]).intValue()
);
return;
@@ -25,6 +25,7 @@ import com.threerings.parlor.card.data.Card;
import com.threerings.parlor.card.trick.client.TrickCardGameService;
import com.threerings.presents.client.Client;
import com.threerings.presents.data.InvocationMarshaller;
import com.threerings.presents.net.Transport;
/**
* Provides the implementation of the {@link TrickCardGameService} interface
@@ -53,7 +54,9 @@ public class TrickCardGameMarshaller extends InvocationMarshaller
// from interface TrickCardGameService
public void requestRematch (Client arg1)
{
sendRequest(arg1, REQUEST_REMATCH, new Object[] {});
sendRequest(arg1, REQUEST_REMATCH, new Object[] {
});
}
/** The method id used to dispatch {@link #sendCardsToPlayer} requests. */
@@ -24,6 +24,7 @@ package com.threerings.parlor.card.trick.server;
import com.threerings.parlor.card.data.Card;
import com.threerings.parlor.card.trick.data.TrickCardGameMarshaller;
import com.threerings.presents.data.ClientObject;
import com.threerings.presents.data.InvocationMarshaller;
import com.threerings.presents.server.InvocationDispatcher;
import com.threerings.presents.server.InvocationException;
@@ -47,6 +48,7 @@ public class TrickCardGameDispatcher extends InvocationDispatcher<TrickCardGameM
return new TrickCardGameMarshaller();
}
@SuppressWarnings("unchecked")
@Override // documentation inherited
public void dispatchRequest (
ClientObject source, int methodId, Object[] args)
@@ -55,7 +57,8 @@ public class TrickCardGameDispatcher extends InvocationDispatcher<TrickCardGameM
switch (methodId) {
case TrickCardGameMarshaller.PLAY_CARD:
((TrickCardGameProvider)provider).playCard(
source, (Card)args[0], ((Integer)args[1]).intValue()
source,
(Card)args[0], ((Integer)args[1]).intValue()
);
return;
@@ -67,7 +70,8 @@ public class TrickCardGameDispatcher extends InvocationDispatcher<TrickCardGameM
case TrickCardGameMarshaller.SEND_CARDS_TO_PLAYER:
((TrickCardGameProvider)provider).sendCardsToPlayer(
source, ((Integer)args[0]).intValue(), (Card[])args[1]
source,
((Integer)args[0]).intValue(), (Card[])args[1]
);
return;
@@ -22,7 +22,6 @@
package com.threerings.parlor.card.trick.server;
import com.threerings.parlor.card.data.Card;
import com.threerings.parlor.card.trick.client.TrickCardGameService;
import com.threerings.presents.data.ClientObject;
import com.threerings.presents.server.InvocationProvider;
@@ -34,15 +33,15 @@ public interface TrickCardGameProvider extends InvocationProvider
/**
* Handles a {@link TrickCardGameService#playCard} request.
*/
void playCard (ClientObject caller, Card arg1, int arg2);
public void playCard (ClientObject caller, Card arg1, int arg2);
/**
* Handles a {@link TrickCardGameService#requestRematch} request.
*/
void requestRematch (ClientObject caller);
public void requestRematch (ClientObject caller);
/**
* Handles a {@link TrickCardGameService#sendCardsToPlayer} request.
*/
void sendCardsToPlayer (ClientObject caller, int arg1, Card[] arg2);
public void sendCardsToPlayer (ClientObject caller, int arg1, Card[] arg2);
}
@@ -68,4 +68,9 @@ public interface TableService extends InvocationService
* creator).
*/
public void startTableNow (Client client, int tableId, InvocationListener listener);
/**
* Requests that another user be booted from the specified table.
*/
public void bootPlayer (Client client, int tableId, int bodyId, InvocationListener listener);
}
@@ -27,6 +27,7 @@ import com.threerings.presents.client.Client;
import com.threerings.presents.client.InvocationService;
import com.threerings.presents.data.InvocationMarshaller;
import com.threerings.presents.dobj.InvocationResponseEvent;
import com.threerings.presents.net.Transport;
import com.threerings.util.Name;
/**
@@ -40,7 +41,7 @@ public class ParlorMarshaller extends InvocationMarshaller
implements ParlorService
{
/**
* Marshalls results to implementations of {@link ParlorService.InviteListener}.
* Marshalls results to implementations of {@link InviteListener}.
*/
public static class InviteMarshaller extends ListenerMarshaller
implements InviteListener
@@ -26,6 +26,7 @@ import com.threerings.parlor.game.data.GameConfig;
import com.threerings.presents.client.Client;
import com.threerings.presents.client.InvocationService;
import com.threerings.presents.data.InvocationMarshaller;
import com.threerings.presents.net.Transport;
/**
* Provides the implementation of the {@link TableService} interface
@@ -37,8 +38,21 @@ import com.threerings.presents.data.InvocationMarshaller;
public class TableMarshaller extends InvocationMarshaller
implements TableService
{
/** The method id used to dispatch {@link #bootPlayer} requests. */
public static final int BOOT_PLAYER = 1;
// from interface TableService
public void bootPlayer (Client arg1, int arg2, int arg3, InvocationService.InvocationListener arg4)
{
ListenerMarshaller listener4 = new ListenerMarshaller();
listener4.listener = arg4;
sendRequest(arg1, BOOT_PLAYER, new Object[] {
Integer.valueOf(arg2), Integer.valueOf(arg3), listener4
});
}
/** The method id used to dispatch {@link #createTable} requests. */
public static final int CREATE_TABLE = 1;
public static final int CREATE_TABLE = 2;
// from interface TableService
public void createTable (Client arg1, TableConfig arg2, GameConfig arg3, InvocationService.ResultListener arg4)
@@ -51,7 +65,7 @@ public class TableMarshaller extends InvocationMarshaller
}
/** The method id used to dispatch {@link #joinTable} requests. */
public static final int JOIN_TABLE = 2;
public static final int JOIN_TABLE = 3;
// from interface TableService
public void joinTable (Client arg1, int arg2, int arg3, InvocationService.InvocationListener arg4)
@@ -64,7 +78,7 @@ public class TableMarshaller extends InvocationMarshaller
}
/** The method id used to dispatch {@link #leaveTable} requests. */
public static final int LEAVE_TABLE = 3;
public static final int LEAVE_TABLE = 4;
// from interface TableService
public void leaveTable (Client arg1, int arg2, InvocationService.InvocationListener arg3)
@@ -77,7 +91,7 @@ public class TableMarshaller extends InvocationMarshaller
}
/** The method id used to dispatch {@link #startTableNow} requests. */
public static final int START_TABLE_NOW = 4;
public static final int START_TABLE_NOW = 5;
// from interface TableService
public void startTableNow (Client arg1, int arg2, InvocationService.InvocationListener arg3)
@@ -26,6 +26,7 @@ import com.threerings.parlor.data.ParlorMarshaller;
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;
import com.threerings.util.Name;
@@ -50,6 +51,7 @@ public class ParlorDispatcher extends InvocationDispatcher<ParlorMarshaller>
return new ParlorMarshaller();
}
@SuppressWarnings("unchecked")
@Override // documentation inherited
public void dispatchRequest (
ClientObject source, int methodId, Object[] args)
@@ -58,25 +60,29 @@ public class ParlorDispatcher extends InvocationDispatcher<ParlorMarshaller>
switch (methodId) {
case ParlorMarshaller.CANCEL:
((ParlorProvider)provider).cancel(
source, ((Integer)args[0]).intValue(), (InvocationService.InvocationListener)args[1]
source,
((Integer)args[0]).intValue(), (InvocationService.InvocationListener)args[1]
);
return;
case ParlorMarshaller.INVITE:
((ParlorProvider)provider).invite(
source, (Name)args[0], (GameConfig)args[1], (ParlorService.InviteListener)args[2]
source,
(Name)args[0], (GameConfig)args[1], (ParlorService.InviteListener)args[2]
);
return;
case ParlorMarshaller.RESPOND:
((ParlorProvider)provider).respond(
source, ((Integer)args[0]).intValue(), ((Integer)args[1]).intValue(), args[2], (InvocationService.InvocationListener)args[3]
source,
((Integer)args[0]).intValue(), ((Integer)args[1]).intValue(), args[2], (InvocationService.InvocationListener)args[3]
);
return;
case ParlorMarshaller.START_SOLITAIRE:
((ParlorProvider)provider).startSolitaire(
source, (GameConfig)args[0], (InvocationService.ConfirmListener)args[1]
source,
(GameConfig)args[0], (InvocationService.ConfirmListener)args[1]
);
return;
@@ -37,24 +37,24 @@ public interface ParlorProvider extends InvocationProvider
/**
* Handles a {@link ParlorService#cancel} request.
*/
void cancel (ClientObject caller, int arg1, InvocationService.InvocationListener arg2)
public void cancel (ClientObject caller, int arg1, InvocationService.InvocationListener arg2)
throws InvocationException;
/**
* Handles a {@link ParlorService#invite} request.
*/
void invite (ClientObject caller, Name arg1, GameConfig arg2, ParlorService.InviteListener arg3)
public void invite (ClientObject caller, Name arg1, GameConfig arg2, ParlorService.InviteListener arg3)
throws InvocationException;
/**
* Handles a {@link ParlorService#respond} request.
*/
void respond (ClientObject caller, int arg1, int arg2, Object arg3, InvocationService.InvocationListener arg4)
public void respond (ClientObject caller, int arg1, int arg2, Object arg3, InvocationService.InvocationListener arg4)
throws InvocationException;
/**
* Handles a {@link ParlorService#startSolitaire} request.
*/
void startSolitaire (ClientObject caller, GameConfig arg1, InvocationService.ConfirmListener arg2)
public void startSolitaire (ClientObject caller, GameConfig arg1, InvocationService.ConfirmListener arg2)
throws InvocationException;
}
@@ -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;
@@ -108,6 +108,14 @@ public class TableManager
_tableClass = tableClass;
}
/**
* Allow a player in the first position of a table to boot others.
*/
public void setAllowBooting (boolean allowBooting)
{
_allowBooting = allowBooting;
}
/**
* Creates a table for the specified creator and returns said table.
*
@@ -126,7 +134,7 @@ public class TableManager
try {
table = _tableClass.newInstance();
} catch (Exception e) {
log.warning("Table.newInstance() failde [class=" + _tableClass + ", e=" + e + "].");
log.warning("Table.newInstance() failed [class=" + _tableClass + ", e=" + e + "].");
throw new InvocationException(INTERNAL_ERROR);
}
table.init(_dobj.getOid(), tableConfig, config);
@@ -160,7 +168,7 @@ public class TableManager
return table;
}
// from interface ParlorProvider
// from interface TableProvider
public void createTable (ClientObject caller, TableConfig tableConfig, GameConfig config,
TableService.ResultListener listener)
throws InvocationException
@@ -180,7 +188,7 @@ public class TableManager
listener.requestProcessed(createTable(creator, tableConfig, config).tableId);
}
// from interface ParlorProvider
// from interface TableProvider
public void joinTable (ClientObject caller, int tableId, int position,
TableService.InvocationListener listener)
throws InvocationException
@@ -220,7 +228,7 @@ public class TableManager
// themselves show up in the table that they joined
}
// from interface ParlorProvider
// from interface TableProvider
public void leaveTable (ClientObject caller, int tableId,
TableService.InvocationListener listener)
throws InvocationException
@@ -256,7 +264,7 @@ public class TableManager
// themselves removed from the table they just left
}
// from interface ParlorProvider
// from interface TableProvider
public void startTableNow (ClientObject caller, int tableId,
TableService.InvocationListener listener)
throws InvocationException
@@ -273,6 +281,32 @@ public class TableManager
createGame(table);
}
// from interface TableProvider
public void bootPlayer (ClientObject caller, int tableId, int bodyId,
TableService.InvocationListener listener)
throws InvocationException
{
BodyObject booter = (BodyObject) caller;
Table table = _tables.get(tableId);
if (table == null) {
throw new InvocationException(NO_SUCH_TABLE);
} else if (booter.getOid() != table.bodyOids[0]) {
throw new InvocationException(INVALID_TABLE_POSITION);
} else if ( ! _allowBooting) {
throw new InvocationException(INTERNAL_ERROR);
}
// Remove the player from the table
if ( ! table.clearPlayerByOid(bodyId)) {
throw new InvocationException(NOT_AT_TABLE);
}
if (notePlayerRemoved(bodyId) == null) {
log.warning("No body to table mapping to clear? [bodyId=" + bodyId +
", table=" + table + "].");
}
}
/**
* Removes the table from all of our internal tables and from its lobby's distributed object.
*/
@@ -556,6 +590,9 @@ public class TableManager
/** A listener that removes users from tables when they're no longer able to play. */
protected ChangeListener _userListener = new UserListener();
/** Whether or not tables should support booting. */
protected boolean _allowBooting = false;
protected RootDObjectManager _omgr;
protected InvocationManager _invmgr;
protected PlaceRegistry _plreg;
@@ -21,7 +21,6 @@
package com.threerings.parlor.server;
import com.threerings.parlor.client.TableService;
import com.threerings.parlor.data.TableConfig;
import com.threerings.parlor.game.data.GameConfig;
import com.threerings.presents.client.InvocationService;
@@ -34,27 +33,33 @@ import com.threerings.presents.server.InvocationProvider;
*/
public interface TableProvider extends InvocationProvider
{
/**
* Handles a {@link TableService#bootPlayer} request.
*/
public void bootPlayer (ClientObject caller, int arg1, int arg2, InvocationService.InvocationListener arg3)
throws InvocationException;
/**
* Handles a {@link TableService#createTable} request.
*/
void createTable (ClientObject caller, TableConfig arg1, GameConfig arg2, InvocationService.ResultListener arg3)
public void createTable (ClientObject caller, TableConfig arg1, GameConfig arg2, InvocationService.ResultListener arg3)
throws InvocationException;
/**
* Handles a {@link TableService#joinTable} request.
*/
void joinTable (ClientObject caller, int arg1, int arg2, InvocationService.InvocationListener arg3)
public void joinTable (ClientObject caller, int arg1, int arg2, InvocationService.InvocationListener arg3)
throws InvocationException;
/**
* Handles a {@link TableService#leaveTable} request.
*/
void leaveTable (ClientObject caller, int arg1, InvocationService.InvocationListener arg2)
public void leaveTable (ClientObject caller, int arg1, InvocationService.InvocationListener arg2)
throws InvocationException;
/**
* Handles a {@link TableService#startTableNow} request.
*/
void startTableNow (ClientObject caller, int arg1, InvocationService.InvocationListener arg2)
public void startTableNow (ClientObject caller, int arg1, InvocationService.InvocationListener arg2)
throws InvocationException;
}
@@ -25,6 +25,7 @@ import com.threerings.parlor.tourney.client.TourneyService;
import com.threerings.presents.client.Client;
import com.threerings.presents.client.InvocationService;
import com.threerings.presents.data.InvocationMarshaller;
import com.threerings.presents.net.Transport;
/**
* Provides the implementation of the {@link TourneyService} interface
@@ -25,6 +25,7 @@ import com.threerings.parlor.tourney.client.TourniesService;
import com.threerings.presents.client.Client;
import com.threerings.presents.client.InvocationService;
import com.threerings.presents.data.InvocationMarshaller;
import com.threerings.presents.net.Transport;
/**
* Provides the implementation of the {@link TourniesService} interface
@@ -24,6 +24,7 @@ package com.threerings.parlor.tourney.server;
import com.threerings.parlor.tourney.data.TourneyMarshaller;
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;
@@ -47,6 +48,7 @@ public class TourneyDispatcher extends InvocationDispatcher<TourneyMarshaller>
return new TourneyMarshaller();
}
@SuppressWarnings("unchecked")
@Override // documentation inherited
public void dispatchRequest (
ClientObject source, int methodId, Object[] args)
@@ -55,19 +57,22 @@ public class TourneyDispatcher extends InvocationDispatcher<TourneyMarshaller>
switch (methodId) {
case TourneyMarshaller.CANCEL:
((TourneyProvider)provider).cancel(
source, (InvocationService.ConfirmListener)args[0]
source,
(InvocationService.ConfirmListener)args[0]
);
return;
case TourneyMarshaller.JOIN:
((TourneyProvider)provider).join(
source, (InvocationService.ConfirmListener)args[0]
source,
(InvocationService.ConfirmListener)args[0]
);
return;
case TourneyMarshaller.LEAVE:
((TourneyProvider)provider).leave(
source, (InvocationService.ConfirmListener)args[0]
source,
(InvocationService.ConfirmListener)args[0]
);
return;
@@ -21,7 +21,6 @@
package com.threerings.parlor.tourney.server;
import com.threerings.parlor.tourney.client.TourneyService;
import com.threerings.presents.client.InvocationService;
import com.threerings.presents.data.ClientObject;
import com.threerings.presents.server.InvocationException;
@@ -35,18 +34,18 @@ public interface TourneyProvider extends InvocationProvider
/**
* Handles a {@link TourneyService#cancel} request.
*/
void cancel (ClientObject caller, InvocationService.ConfirmListener arg1)
public void cancel (ClientObject caller, InvocationService.ConfirmListener arg1)
throws InvocationException;
/**
* Handles a {@link TourneyService#join} request.
*/
void join (ClientObject caller, InvocationService.ConfirmListener arg1)
public void join (ClientObject caller, InvocationService.ConfirmListener arg1)
throws InvocationException;
/**
* Handles a {@link TourneyService#leave} request.
*/
void leave (ClientObject caller, InvocationService.ConfirmListener arg1)
public void leave (ClientObject caller, InvocationService.ConfirmListener arg1)
throws InvocationException;
}
@@ -25,6 +25,7 @@ import com.threerings.parlor.tourney.data.TourneyConfig;
import com.threerings.parlor.tourney.data.TourniesMarshaller;
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;
@@ -48,6 +49,7 @@ public class TourniesDispatcher extends InvocationDispatcher<TourniesMarshaller>
return new TourniesMarshaller();
}
@SuppressWarnings("unchecked")
@Override // documentation inherited
public void dispatchRequest (
ClientObject source, int methodId, Object[] args)
@@ -56,7 +58,8 @@ public class TourniesDispatcher extends InvocationDispatcher<TourniesMarshaller>
switch (methodId) {
case TourniesMarshaller.CREATE_TOURNEY:
((TourniesProvider)provider).createTourney(
source, (TourneyConfig)args[0], (InvocationService.ResultListener)args[1]
source,
(TourneyConfig)args[0], (InvocationService.ResultListener)args[1]
);
return;
@@ -21,7 +21,6 @@
package com.threerings.parlor.tourney.server;
import com.threerings.parlor.tourney.client.TourniesService;
import com.threerings.parlor.tourney.data.TourneyConfig;
import com.threerings.presents.client.InvocationService;
import com.threerings.presents.data.ClientObject;
@@ -36,6 +35,6 @@ public interface TourniesProvider extends InvocationProvider
/**
* Handles a {@link TourniesService#createTourney} request.
*/
void createTourney (ClientObject caller, TourneyConfig arg1, InvocationService.ResultListener arg2)
public void createTourney (ClientObject caller, TourneyConfig arg1, InvocationService.ResultListener arg2)
throws InvocationException;
}
@@ -23,6 +23,7 @@ package com.threerings.puzzle.data;
import com.threerings.presents.client.Client;
import com.threerings.presents.data.InvocationMarshaller;
import com.threerings.presents.net.Transport;
import com.threerings.puzzle.client.PuzzleGameService;
/**
@@ -22,6 +22,7 @@
package com.threerings.puzzle.server;
import com.threerings.presents.data.ClientObject;
import com.threerings.presents.data.InvocationMarshaller;
import com.threerings.presents.server.InvocationDispatcher;
import com.threerings.presents.server.InvocationException;
import com.threerings.puzzle.data.Board;
@@ -47,6 +48,7 @@ public class PuzzleGameDispatcher extends InvocationDispatcher<PuzzleGameMarshal
return new PuzzleGameMarshaller();
}
@SuppressWarnings("unchecked")
@Override // documentation inherited
public void dispatchRequest (
ClientObject source, int methodId, Object[] args)
@@ -55,13 +57,15 @@ public class PuzzleGameDispatcher extends InvocationDispatcher<PuzzleGameMarshal
switch (methodId) {
case PuzzleGameMarshaller.UPDATE_PROGRESS:
((PuzzleGameProvider)provider).updateProgress(
source, ((Integer)args[0]).intValue(), (int[])args[1]
source,
((Integer)args[0]).intValue(), (int[])args[1]
);
return;
case PuzzleGameMarshaller.UPDATE_PROGRESS_SYNC:
((PuzzleGameProvider)provider).updateProgressSync(
source, ((Integer)args[0]).intValue(), (int[])args[1], (Board[])args[2]
source,
((Integer)args[0]).intValue(), (int[])args[1], (Board[])args[2]
);
return;
@@ -23,7 +23,6 @@ package com.threerings.puzzle.server;
import com.threerings.presents.data.ClientObject;
import com.threerings.presents.server.InvocationProvider;
import com.threerings.puzzle.client.PuzzleGameService;
import com.threerings.puzzle.data.Board;
/**
@@ -34,10 +33,10 @@ public interface PuzzleGameProvider extends InvocationProvider
/**
* Handles a {@link PuzzleGameService#updateProgress} request.
*/
void updateProgress (ClientObject caller, int arg1, int[] arg2);
public void updateProgress (ClientObject caller, int arg1, int[] arg2);
/**
* Handles a {@link PuzzleGameService#updateProgressSync} request.
*/
void updateProgressSync (ClientObject caller, int arg1, int[] arg2, Board[] arg3);
public void updateProgressSync (ClientObject caller, int arg1, int[] arg2, Board[] arg3);
}
@@ -25,6 +25,7 @@ import com.threerings.miso.data.ObjectInfo;
import com.threerings.presents.client.Client;
import com.threerings.presents.client.InvocationService;
import com.threerings.presents.data.InvocationMarshaller;
import com.threerings.presents.net.Transport;
import com.threerings.stage.client.StageSceneService;
/**
@@ -24,6 +24,7 @@ package com.threerings.stage.server;
import com.threerings.miso.data.ObjectInfo;
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;
import com.threerings.stage.data.StageSceneMarshaller;
@@ -48,6 +49,7 @@ public class StageSceneDispatcher extends InvocationDispatcher<StageSceneMarshal
return new StageSceneMarshaller();
}
@SuppressWarnings("unchecked")
@Override // documentation inherited
public void dispatchRequest (
ClientObject source, int methodId, Object[] args)
@@ -56,13 +58,15 @@ public class StageSceneDispatcher extends InvocationDispatcher<StageSceneMarshal
switch (methodId) {
case StageSceneMarshaller.ADD_OBJECT:
((StageSceneProvider)provider).addObject(
source, (ObjectInfo)args[0], (InvocationService.ConfirmListener)args[1]
source,
(ObjectInfo)args[0], (InvocationService.ConfirmListener)args[1]
);
return;
case StageSceneMarshaller.REMOVE_OBJECTS:
((StageSceneProvider)provider).removeObjects(
source, (ObjectInfo[])args[0], (InvocationService.ConfirmListener)args[1]
source,
(ObjectInfo[])args[0], (InvocationService.ConfirmListener)args[1]
);
return;
@@ -26,7 +26,6 @@ import com.threerings.presents.client.InvocationService;
import com.threerings.presents.data.ClientObject;
import com.threerings.presents.server.InvocationException;
import com.threerings.presents.server.InvocationProvider;
import com.threerings.stage.client.StageSceneService;
/**
* Defines the server-side of the {@link StageSceneService}.
@@ -36,12 +35,12 @@ public interface StageSceneProvider extends InvocationProvider
/**
* Handles a {@link StageSceneService#addObject} request.
*/
void addObject (ClientObject caller, ObjectInfo arg1, InvocationService.ConfirmListener arg2)
public void addObject (ClientObject caller, ObjectInfo arg1, InvocationService.ConfirmListener arg2)
throws InvocationException;
/**
* Handles a {@link StageSceneService#removeObjects} request.
*/
void removeObjects (ClientObject caller, ObjectInfo[] arg1, InvocationService.ConfirmListener arg2)
public void removeObjects (ClientObject caller, ObjectInfo[] arg1, InvocationService.ConfirmListener arg2)
throws InvocationException;
}
@@ -25,6 +25,7 @@ import com.threerings.crowd.data.PlaceConfig;
import com.threerings.presents.client.Client;
import com.threerings.presents.data.InvocationMarshaller;
import com.threerings.presents.dobj.InvocationResponseEvent;
import com.threerings.presents.net.Transport;
import com.threerings.whirled.client.SceneService;
/**
@@ -38,7 +39,7 @@ public class SceneMarshaller extends InvocationMarshaller
implements SceneService
{
/**
* Marshalls results to implementations of {@link SceneService.SceneMoveListener}.
* Marshalls results to implementations of {@link SceneMoveListener}.
*/
public static class SceneMoveMarshaller extends ListenerMarshaller
implements SceneMoveListener
@@ -22,6 +22,7 @@
package com.threerings.whirled.server;
import com.threerings.presents.data.ClientObject;
import com.threerings.presents.data.InvocationMarshaller;
import com.threerings.presents.server.InvocationDispatcher;
import com.threerings.presents.server.InvocationException;
import com.threerings.whirled.client.SceneService;
@@ -47,6 +48,7 @@ public class SceneDispatcher extends InvocationDispatcher<SceneMarshaller>
return new SceneMarshaller();
}
@SuppressWarnings("unchecked")
@Override // documentation inherited
public void dispatchRequest (
ClientObject source, int methodId, Object[] args)
@@ -55,7 +57,8 @@ public class SceneDispatcher extends InvocationDispatcher<SceneMarshaller>
switch (methodId) {
case SceneMarshaller.MOVE_TO:
((SceneProvider)provider).moveTo(
source, ((Integer)args[0]).intValue(), ((Integer)args[1]).intValue(), (SceneService.SceneMoveListener)args[2]
source,
((Integer)args[0]).intValue(), ((Integer)args[1]).intValue(), (SceneService.SceneMoveListener)args[2]
);
return;
@@ -34,6 +34,6 @@ public interface SceneProvider extends InvocationProvider
/**
* Handles a {@link SceneService#moveTo} request.
*/
void moveTo (ClientObject caller, int arg1, int arg2, SceneService.SceneMoveListener arg3)
public void moveTo (ClientObject caller, int arg1, int arg2, SceneService.SceneMoveListener arg3)
throws InvocationException;
}
@@ -24,6 +24,7 @@ package com.threerings.whirled.spot.data;
import com.threerings.presents.client.Client;
import com.threerings.presents.client.InvocationService;
import com.threerings.presents.data.InvocationMarshaller;
import com.threerings.presents.net.Transport;
import com.threerings.whirled.client.SceneService;
import com.threerings.whirled.data.SceneMarshaller;
import com.threerings.whirled.spot.client.SpotService;
@@ -23,6 +23,7 @@ package com.threerings.whirled.spot.server;
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;
import com.threerings.whirled.client.SceneService;
@@ -49,6 +50,7 @@ public class SpotDispatcher extends InvocationDispatcher<SpotMarshaller>
return new SpotMarshaller();
}
@SuppressWarnings("unchecked")
@Override // documentation inherited
public void dispatchRequest (
ClientObject source, int methodId, Object[] args)
@@ -57,25 +59,29 @@ public class SpotDispatcher extends InvocationDispatcher<SpotMarshaller>
switch (methodId) {
case SpotMarshaller.CHANGE_LOCATION:
((SpotProvider)provider).changeLocation(
source, ((Integer)args[0]).intValue(), (Location)args[1], (InvocationService.ConfirmListener)args[2]
source,
((Integer)args[0]).intValue(), (Location)args[1], (InvocationService.ConfirmListener)args[2]
);
return;
case SpotMarshaller.CLUSTER_SPEAK:
((SpotProvider)provider).clusterSpeak(
source, (String)args[0], ((Byte)args[1]).byteValue()
source,
(String)args[0], ((Byte)args[1]).byteValue()
);
return;
case SpotMarshaller.JOIN_CLUSTER:
((SpotProvider)provider).joinCluster(
source, ((Integer)args[0]).intValue(), (InvocationService.ConfirmListener)args[1]
source,
((Integer)args[0]).intValue(), (InvocationService.ConfirmListener)args[1]
);
return;
case SpotMarshaller.TRAVERSE_PORTAL:
((SpotProvider)provider).traversePortal(
source, ((Integer)args[0]).intValue(), ((Integer)args[1]).intValue(), ((Integer)args[2]).intValue(), (SceneService.SceneMoveListener)args[3]
source,
((Integer)args[0]).intValue(), ((Integer)args[1]).intValue(), ((Integer)args[2]).intValue(), (SceneService.SceneMoveListener)args[3]
);
return;
@@ -26,7 +26,6 @@ import com.threerings.presents.data.ClientObject;
import com.threerings.presents.server.InvocationException;
import com.threerings.presents.server.InvocationProvider;
import com.threerings.whirled.client.SceneService;
import com.threerings.whirled.spot.client.SpotService;
import com.threerings.whirled.spot.data.Location;
/**
@@ -37,23 +36,23 @@ public interface SpotProvider extends InvocationProvider
/**
* Handles a {@link SpotService#changeLocation} request.
*/
void changeLocation (ClientObject caller, int arg1, Location arg2, InvocationService.ConfirmListener arg3)
public void changeLocation (ClientObject caller, int arg1, Location arg2, InvocationService.ConfirmListener arg3)
throws InvocationException;
/**
* Handles a {@link SpotService#clusterSpeak} request.
*/
void clusterSpeak (ClientObject caller, String arg1, byte arg2);
public void clusterSpeak (ClientObject caller, String arg1, byte arg2);
/**
* Handles a {@link SpotService#joinCluster} request.
*/
void joinCluster (ClientObject caller, int arg1, InvocationService.ConfirmListener arg2)
public void joinCluster (ClientObject caller, int arg1, InvocationService.ConfirmListener arg2)
throws InvocationException;
/**
* Handles a {@link SpotService#traversePortal} request.
*/
void traversePortal (ClientObject caller, int arg1, int arg2, int arg3, SceneService.SceneMoveListener arg4)
public void traversePortal (ClientObject caller, int arg1, int arg2, int arg3, SceneService.SceneMoveListener arg4)
throws InvocationException;
}
@@ -25,6 +25,7 @@ import com.threerings.crowd.data.PlaceConfig;
import com.threerings.presents.client.Client;
import com.threerings.presents.data.InvocationMarshaller;
import com.threerings.presents.dobj.InvocationResponseEvent;
import com.threerings.presents.net.Transport;
import com.threerings.whirled.data.SceneModel;
import com.threerings.whirled.data.SceneUpdate;
import com.threerings.whirled.zone.client.ZoneService;
@@ -40,7 +41,7 @@ public class ZoneMarshaller extends InvocationMarshaller
implements ZoneService
{
/**
* Marshalls results to implementations of {@link ZoneService.ZoneMoveListener}.
* Marshalls results to implementations of {@link ZoneMoveListener}.
*/
public static class ZoneMoveMarshaller extends ListenerMarshaller
implements ZoneMoveListener
@@ -22,6 +22,7 @@
package com.threerings.whirled.zone.server;
import com.threerings.presents.data.ClientObject;
import com.threerings.presents.data.InvocationMarshaller;
import com.threerings.presents.server.InvocationDispatcher;
import com.threerings.presents.server.InvocationException;
import com.threerings.whirled.zone.client.ZoneService;
@@ -47,6 +48,7 @@ public class ZoneDispatcher extends InvocationDispatcher<ZoneMarshaller>
return new ZoneMarshaller();
}
@SuppressWarnings("unchecked")
@Override // documentation inherited
public void dispatchRequest (
ClientObject source, int methodId, Object[] args)
@@ -55,7 +57,8 @@ public class ZoneDispatcher extends InvocationDispatcher<ZoneMarshaller>
switch (methodId) {
case ZoneMarshaller.MOVE_TO:
((ZoneProvider)provider).moveTo(
source, ((Integer)args[0]).intValue(), ((Integer)args[1]).intValue(), ((Integer)args[2]).intValue(), (ZoneService.ZoneMoveListener)args[3]
source,
((Integer)args[0]).intValue(), ((Integer)args[1]).intValue(), ((Integer)args[2]).intValue(), (ZoneService.ZoneMoveListener)args[3]
);
return;
@@ -34,6 +34,6 @@ public interface ZoneProvider extends InvocationProvider
/**
* Handles a {@link ZoneService#moveTo} request.
*/
void moveTo (ClientObject caller, int arg1, int arg2, int arg3, ZoneService.ZoneMoveListener arg4)
public void moveTo (ClientObject caller, int arg1, int arg2, int arg3, ZoneService.ZoneMoveListener arg4)
throws InvocationException;
}