Debian Codegraph @

src/java/org/astrogrid/samp/client/CallableClient.java

raw
1 package org.astrogrid.samp.client;
2
3 import java.util.Map;
4 import org.astrogrid.samp.Message;
5 import org.astrogrid.samp.Response;
6
7 /**
8 * Defines callbacks which the hub can make on a callable client.
9 *
10 * @author Mark Taylor
11 * @since 16 Jul 2008
12 */
13 public interface CallableClient {
14
15 /**
16 * Receives a message for which no response is required.
17 *
18 * @param senderId public ID of sending client
19 * @param message message
20 */
21 void receiveNotification( String senderId, Message message )
22 throws Exception;
23
24 /**
25 * Receives a message for which a response is required.
26 * The implementation must take care to call the hub's <code>reply</code>
27 * method at some future point.
28 *
29 * @param senderId public ID of sending client
30 * @param msgId message identifier for later use with reply
31 * @param message message
32 */
33 void receiveCall( String senderId, String msgId, Message message )
34 throws Exception;
35
36 /**
37 * Receives a response to a message previously sent by this client.
38 *
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 responderId, String msgTag,
44 Response response ) throws Exception;
45 }