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: Communicator.java,v 1.13 2001/08/07 20:38:58 mdb Exp $
// $Id: Communicator.java,v 1.14 2001/10/01 22:14:54 mdb Exp $
package com.threerings.cocktail.cher.client;
@@ -15,7 +15,6 @@ import com.threerings.cocktail.cher.dobj.DObjectManager;
import com.threerings.cocktail.cher.io.*;
import com.threerings.cocktail.cher.io.ObjectStreamException;
import com.threerings.cocktail.cher.net.*;
import com.threerings.cocktail.cher.util.Codes;
/**
* The client performs all network I/O on separate threads (one for
@@ -340,7 +339,7 @@ public class Communicator
// if the auth request failed, we want to let the communicator
// know by throwing a logon exception
if (!data.code.equals(Codes.SUCCESS)) {
if (!data.code.equals(AuthResponseData.SUCCESS)) {
throw new LogonException(data.code);
}
@@ -0,0 +1,20 @@
//
// $Id: InvocationCodes.java,v 1.1 2001/10/01 22:14:54 mdb Exp $
package com.threerings.cocktail.cher.client;
/**
* The invocation codes interface provides codes that are commonly used by
* invocation service implementations. It is implemented as an interface
* so that were an invocation service to desire to build on two or more
* other services, it can provide a codes interface that inherits from all
* of the services that it extends.
*/
public interface InvocationCodes
{
/**
* Generally used in responses that can either have the value success,
* or a string code explaining the reason for failure.
*/
public static final String SUCCESS = "success";
}