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,36 +1,32 @@
//
// $Id: TimeBaseService.java,v 1.2 2002/05/29 18:44:36 mdb Exp $
// $Id: TimeBaseService.java,v 1.3 2002/08/14 19:07:54 mdb Exp $
package com.threerings.presents.client;
import com.threerings.presents.Log;
import com.threerings.presents.client.Client;
import com.threerings.presents.client.InvocationDirector;
import com.threerings.presents.data.TimeBaseCodes;
import com.threerings.presents.client.InvocationService;
/**
* Provides a means by which to obtain access to a time base object which
* can be used to convert delta times into absolute times.
*/
public class TimeBaseService
implements TimeBaseCodes
public interface TimeBaseService extends InvocationService
{
/**
* Requests the oid of the specified time base object be returned. The
* supplied response target must provide two methods to handle the
* responses generated by this request:
*
* <pre>
* public void handleTimeOidResponse (int invid, int timeOid);
* public void handleGetTimeOidFailed (int invid, String reason);
* </pre>
* Used to communicated the result of a {@link #getTimeOid} request.
*/
public static void getTimeOid (
Client client, String timeBase, Object rsptarget)
public static interface GotTimeBaseListener extends InvocationListener
{
InvocationDirector invdir = client.getInvocationDirector();
invdir.invoke(MODULE_NAME, GET_TIME_OID_REQUEST,
new Object[] { timeBase }, rsptarget);
Log.debug("Sent getTimeOid request [timeBase=" + timeBase + "].");
/**
* Communicates the result of a successful {@link #getTimeOid}
* request.
*/
public void gotTimeOid (int timeOid);
}
/**
* Requests the oid of the specified time base object be fetched.
*/
public void getTimeOid (
Client client, String timeBase, GotTimeBaseListener listener);
}