Modified invocation request procedure to provide a reference to the client
object that initiated the request. Implemented the invocation notification side of things. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@76 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,9 +1,12 @@
|
||||
//
|
||||
// $Id: TestProvider.java,v 1.3 2001/07/19 18:08:20 mdb Exp $
|
||||
// $Id: TestProvider.java,v 1.4 2001/07/19 19:18:07 mdb Exp $
|
||||
|
||||
package com.threerings.cocktail.cher.server.test;
|
||||
|
||||
import com.threerings.cocktail.cher.Log;
|
||||
import com.threerings.cocktail.cher.client.test.TestService;
|
||||
import com.threerings.cocktail.cher.data.ClientObject;
|
||||
import com.threerings.cocktail.cher.server.CherServer;
|
||||
import com.threerings.cocktail.cher.server.InvocationProvider;
|
||||
|
||||
/**
|
||||
@@ -11,9 +14,17 @@ import com.threerings.cocktail.cher.server.InvocationProvider;
|
||||
*/
|
||||
public class TestProvider extends InvocationProvider
|
||||
{
|
||||
public Object[] handleTestRequest (String one, int two)
|
||||
public Object[] handleTestRequest (
|
||||
ClientObject source, String one, int two)
|
||||
{
|
||||
Log.info("Test request [one=" + one + ", two=" + two + "].");
|
||||
|
||||
// issue a test notification just for kicks
|
||||
Object[] args = new Object[] { new Integer(1), "two" };
|
||||
CherServer.invmgr.sendNotification(
|
||||
source.getOid(), TestService.MODULE, "Test", args);
|
||||
|
||||
// and issue a response to this invocation request
|
||||
return createResponse("TestSucceeded", one, new Integer(two));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user