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: ChatProvider.java,v 1.2 2001/08/04 02:54:28 mdb Exp $
// $Id: ChatProvider.java,v 1.3 2001/08/11 00:05:58 mdb Exp $
package com.threerings.cocktail.party.chat;
@@ -13,13 +13,13 @@ public class ChatProvider extends InvocationProvider
* Processes a request from a client to deliver a tell message to
* another client.
*/
public Object[] handleTellRequest (
BodyObject source, String target, String message)
public void handleTellRequest (
BodyObject source, int invid, String target, String message)
{
// look up the target body object
BodyObject tobj = PartyServer.lookupBody(target);
if (tobj == null) {
return createResponse("TellFailed", "m.player_not_online");
sendResponse(source, invid, "TellFailed", "m.player_not_online");
}
// deliver a tell notification to the target player
@@ -28,6 +28,6 @@ public class ChatProvider extends InvocationProvider
tobj.getOid(), ChatService.MODULE, ChatService.TELL_NOTIFICATION,
args);
return createResponse("TellSucceeded");
sendResponse(source, invid, "TellSucceeded");
}
}