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,5 +1,5 @@
|
||||
//
|
||||
// $Id: TestClient.java,v 1.6 2001/07/19 18:08:20 mdb Exp $
|
||||
// $Id: TestClient.java,v 1.7 2001/07/19 19:18:06 mdb Exp $
|
||||
|
||||
package com.threerings.cocktail.cher.client.test;
|
||||
|
||||
@@ -38,6 +38,9 @@ public class TestClient
|
||||
Log.info("Client did logon [client=" + client + "].");
|
||||
// try subscribing to a test object
|
||||
client.getDObjectManager().subscribeToObject(2, this);
|
||||
// register our test notification receiver
|
||||
client.getInvocationManager().registerReceiver(TestService.MODULE,
|
||||
new TestReceiver());
|
||||
// issue a test invocation request
|
||||
TestService.test(client, "foo", 1, this);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// $Id: TestReceiver.java,v 1.1 2001/07/19 19:18:06 mdb Exp $
|
||||
|
||||
package com.threerings.cocktail.cher.client.test;
|
||||
|
||||
import com.threerings.cocktail.cher.Log;
|
||||
import com.threerings.cocktail.cher.client.InvocationReceiver;
|
||||
|
||||
public class TestReceiver extends InvocationReceiver
|
||||
{
|
||||
public void handleTestNotification (int one, String two)
|
||||
{
|
||||
Log.info("Received tell notification [one=" + one +
|
||||
", two=" + two + "].");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user