The great invocation services rethink of 2002! Rearchitected the remote

method invocation services and converted everything to the new style.
Could this be my biggest checkin ever?


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1642 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2002-08-14 19:08:01 +00:00
parent 4481c5f835
commit e54a4d41f4
161 changed files with 6083 additions and 2805 deletions
@@ -1,20 +1,32 @@
//
// $Id: ZoneService.java,v 1.5 2002/05/15 23:54:35 mdb Exp $
// $Id: ZoneService.java,v 1.6 2002/08/14 19:07:58 mdb Exp $
package com.threerings.whirled.zone.client;
import com.threerings.presents.client.Client;
import com.threerings.presents.client.InvocationDirector;
import com.threerings.presents.client.InvocationService;
import com.threerings.whirled.zone.Log;
import com.threerings.whirled.zone.data.ZoneCodes;
import com.threerings.crowd.data.PlaceConfig;
import com.threerings.whirled.data.SceneModel;
import com.threerings.whirled.zone.data.ZoneSummary;
/**
* The zone service class provides the client interface to the zone
* related invocation services (e.g. moving between zones).
* Defines the client interface to the zone related invocation services
* (e.g. moving between zones).
*/
public class ZoneService implements ZoneCodes
public interface ZoneService extends InvocationService
{
public static interface ZoneMoveListener extends InvocationListener
{
public void moveSucceeded (
int placeId, PlaceConfig config, ZoneSummary summary);
public void moveSucceededPlusUpdate (
int placeId, PlaceConfig config, ZoneSummary summary,
SceneModel model);
}
/**
* Requests that that this client's body be moved to the specified
* scene in the specified zone.
@@ -23,17 +35,9 @@ public class ZoneService implements ZoneCodes
* @param sceneId the scene id to which we want to move.
* @param sceneVers the version number of the scene object that we
* have in our local repository.
* @param rsptarget the object that will receive the callback when the
* @param listener the object that will receive the callback when the
* request succeeds or fails.
*/
public static void moveTo (Client client, int zoneId, int sceneId,
int sceneVers, Object rsptarget)
{
InvocationDirector invdir = client.getInvocationDirector();
Object[] args = new Object[] {
new Integer(zoneId), new Integer(sceneId), new Integer(sceneVers) };
invdir.invoke(MODULE_NAME, MOVE_TO_REQUEST, args, rsptarget);
Log.debug("Sent moveTo request [zone=" + zoneId +
", scene=" + sceneId + ", version=" + sceneVers + "].");
}
public void moveTo (Client client, int zoneId, int sceneId,
int sceneVers, ZoneMoveListener listener);
}