Created fooCodes interfaces to go along with invocation service

packages. These contain all the message codes as well as error response
codes that are used by a particular invocation service.

Also changed client.LocationManager to client.LocationDirector and
chat.ChatManager to chat.ChatDirector to go along with the new philosophy
of naming the client-side managing entity for an invocation service a
director.

Also elimitated cocktail.util.Codes since it's no longer used as a central
repository for codes (instead they are in InvocationCodes and its
derivatives).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@368 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2001-10-01 22:14:55 +00:00
parent 543f977475
commit 027bb29769
17 changed files with 186 additions and 113 deletions
@@ -1,5 +1,5 @@
//
// $Id: LocationService.java,v 1.1 2001/07/23 21:14:27 mdb Exp $
// $Id: LocationService.java,v 1.2 2001/10/01 22:14:55 mdb Exp $
package com.threerings.cocktail.party.client;
@@ -11,25 +11,22 @@ import com.threerings.cocktail.party.Log;
* 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 manager.
* location director.
*
* @see LocationManager
* @see LocationDirector
*/
public class LocationService
public class LocationService implements LocationCodes
{
/** The module name for the location services. */
public static final String MODULE = "location";
/**
* Requests that that this client's body be moved to the specified
* location.
*/
public static void moveTo (Client client, int placeId,
LocationManager rsptarget)
LocationDirector rsptarget)
{
InvocationManager invmgr = client.getInvocationManager();
Object[] args = new Object[] { new Integer(placeId) };
invmgr.invoke(MODULE, "MoveTo", args, rsptarget);
invmgr.invoke(MODULE_NAME, MOVE_TO_REQUEST, args, rsptarget);
Log.info("Sent moveTo request [place=" + placeId + "].");
}
}