Modified invocation services such that providers are responsible for

delivering their own responses. They now have all the information
necessary to do so which means that they can delay the delivery of a
response until some other asynchronous event has taken place (like a
database load completing). Prior to this, they were required to complete
their service immediately and return the response back to the invocation
manager.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@216 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2001-08-11 00:05:58 +00:00
parent 9f4d4e3ac0
commit a44e552eb8
6 changed files with 86 additions and 61 deletions
@@ -1,5 +1,5 @@
//
// $Id: TestProvider.java,v 1.5 2001/08/07 20:38:58 mdb Exp $
// $Id: TestProvider.java,v 1.6 2001/08/11 00:05:58 mdb Exp $
package com.threerings.cocktail.cher.server.test;
@@ -14,8 +14,8 @@ import com.threerings.cocktail.cher.server.InvocationProvider;
*/
public class TestProvider extends InvocationProvider
{
public Object[] handleTestRequest (
ClientObject source, String one, int two)
public void handleTestRequest (
ClientObject source, int invid, String one, int two)
{
Log.info("Test request [one=" + one + ", two=" + two + "].");
@@ -25,12 +25,12 @@ public class TestProvider extends InvocationProvider
source.getOid(), TestService.MODULE, "Test", args);
// and issue a response to this invocation request
return createResponse("TestSucceeded", one, new Integer(two));
sendResponse(source, invid, "TestSucceeded", one, new Integer(two));
}
public Object[] handleGetTestOidRequest (ClientObject source)
public void handleGetTestOidRequest (ClientObject source, int invid)
{
int oid = TestServer.testobj.getOid();
return createResponse("GotTestOid", new Integer(oid));
sendResponse(source, invid, "GotTestOid", new Integer(oid));
}
}