Debian Codegraph @

src/java/org/astrogrid/samp/xmlrpc/ClientActor.java

raw
1 package org.astrogrid.samp.xmlrpc;
2
3 import java.util.Map;
4
5 /**
6 * Defines the methods which an XML-RPC callable client must implement.
7 *
8 * @author Mark Taylor
9 * @since 16 Jul 2008
10 */
11 interface ClientActor {
12
13 /**
14 * Receives a message for which no response is required.
15 *
16 * @param privateKey private key for hub-client communication
17 * @param senderId public ID of sending client
18 * @param msg message
19 */
20 void receiveNotification( String privateKey, String senderId, Map msg )
21 throws Exception;
22
23 /**
24 * Receives a message for which a response is required.
25 * The implementation must take care to call the hub's <code>reply</code>
26 * method at some future point.
27 *
28 * @param privateKey private key for hub-client communication
29 * @param senderId public ID of sending client
30 * @param msgId message identifier for later use with reply
31 * @param msg message
32 */
33 void receiveCall( String privateKey, String senderId, String msgId,
34 Map msg ) throws Exception;
35 /**
36 * Receives a response to a message previously sent by this client.
37 *
38 * @param privateKey private key for hub-client communication
39 * @param responderId public ID of responding client
40 * @param msgTag client-defined tag labelling previously-sent message
41 * @param response returned response object
42 */
43 void receiveResponse( String privateKey, String responderId, String msgTag,
44 Map response ) throws Exception;
45 }