Debian Codegraph @

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

raw
1 package org.astrogrid.samp.xmlrpc;
2
3 import java.util.List;
4
5 /**
6 * Interface for an object which can process certain XML-RPC requests.
7 * Used by {@link SampXmlRpcServer}.
8 *
9 * @author Mark Taylor
10 * @since 22 Aug 2008
11 */
12 public interface SampXmlRpcHandler {
13
14 /**
15 * Returns true if this handler should be able to process
16 * given XML-RPC method.
17 *
18 * @param method method name
19 */
20 boolean canHandleCall( String method );
21
22 /**
23 * Processes an XML-RPC call. This method should only be called if
24 * {@link #canHandleCall canHandleCall(method)} returns true.
25 * The <code>params</code> list and the return value must be
26 * SAMP-compatible, that is only Strings, Lists and String-keyed Maps
27 * are allowed in the data structures.
28 * The <code>reqInfo</code> parameter may be used to provide additional
29 * information about the XML-RPC request, for instance the originating
30 * host; this is implementation specific, and may be null.
31 *
32 * @param method XML-RPC method name
33 * @param params XML-RPC parameter list (SAMP-compatible)
34 * @param reqInfo optional additional request information; may be null
35 * @return return value (SAMP-compatible)
36 */
37 Object handleCall( String method, List params, Object reqInfo )
38 throws Exception;
39 }