Package org.astrogrid.samp.xmlrpc
Interface SampXmlRpcClient
-
- All Known Implementing Classes:
ApacheClient
,InternalClient
,RpcLoggingInternalClient
,XmlLoggingInternalClient
public interface SampXmlRpcClient
Interface for a client which can make XML-RPC calls for SAMP. The method parameters and return values must be of SAMP-compatible types, that is only Strings, Lists, and String-keyed Maps are allowed in the data structures.- Since:
- 22 Aug 2008
- Author:
- Mark Taylor
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
callAndForget(java.lang.String method, java.util.List params)
Sends a call, but does not wait around for the response.java.lang.Object
callAndWait(java.lang.String method, java.util.List params)
Makes a synchronous call, waiting for the response and returning the result.
-
-
-
Method Detail
-
callAndWait
java.lang.Object callAndWait(java.lang.String method, java.util.List params) throws java.io.IOException
Makes a synchronous call, waiting for the response and returning the result.- Parameters:
method
- XML-RPC method nameparams
- parameters for XML-RPC call (SAMP-compatible)- Returns:
- XML-RPC call return value (SAMP-compatible)
- Throws:
java.io.IOException
-
callAndForget
void callAndForget(java.lang.String method, java.util.List params) throws java.io.IOException
Sends a call, but does not wait around for the response. If possible, this method should complete quickly.NOTE: it seems to be difficult to implement this method in a way which is faster than
callAndWait(java.lang.String, java.util.List)
but does not cause problems elsewhere (incomplete HTTP responses). It is probably a good idea to avoid using it if possible.- Parameters:
method
- XML-RPC method nameparams
- parameters for XML-RPC call (SAMP-compatible)- Throws:
java.io.IOException
-
-