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,33 +1,43 @@
//
// $Id: LocationService.java,v 1.6 2002/05/15 23:54:34 mdb Exp $
// $Id: LocationService.java,v 1.7 2002/08/14 19:07:49 mdb Exp $
package com.threerings.crowd.client;
import com.threerings.presents.client.Client;
import com.threerings.presents.client.InvocationDirector;
import com.threerings.presents.client.InvocationService;
import com.threerings.crowd.Log;
import com.threerings.crowd.data.LocationCodes;
import com.threerings.crowd.data.PlaceConfig;
/**
* The location services provide a mechanism by which the client can
* request to move from place to place in the server. These services
* should not be used directly, but instead should be accessed via the
* location director.
*
* @see LocationDirector
* {@link LocationDirector}.
*/
public class LocationService implements LocationCodes
public interface LocationService extends InvocationService
{
/**
* Requests that that this client's body be moved to the specified
* location.
* Used to communicate responses to {@link #moveTo} requests.
*/
public static void moveTo (Client client, int placeId,
LocationDirector rsptarget)
public static interface MoveListener extends InvocationListener
{
InvocationDirector invdir = client.getInvocationDirector();
Object[] args = new Object[] { new Integer(placeId) };
invdir.invoke(MODULE_NAME, MOVE_TO_REQUEST, args, rsptarget);
Log.debug("Sent moveTo request [place=" + placeId + "].");
/**
* Called in response to a successful {@link #moveTo} request.
*/
public void moveSucceeded (PlaceConfig config);
}
/**
* Requests that this client's body be moved to the specified
* location.
*
* @param client a reference to the client object that defines the
* context in which this invocation service should be executed.
* @param placeId the object id of the place object to which the body
* should be moved.
* @param listener the listener that will be informed of success or
* failure.
*/
public void moveTo (Client client, int placeId, MoveListener listener);
}