Package org.astrogrid.samp.xmlrpc.apache
Class ApacheClient
java.lang.Object
org.astrogrid.samp.xmlrpc.apache.ApacheClient
- All Implemented Interfaces:
SampXmlRpcClient
SampXmlRpcClient implementation based on Apache XMLRPC classes.
- Since:
- 16 Sep 2008
- Author:
- Mark Taylor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
callAndForget
(String method, List params) Sends a call, but does not wait around for the response.callAndWait
(String method, List params) Makes a synchronous call, waiting for the response and returning the result.
-
Constructor Details
-
ApacheClient
public ApacheClient(XmlRpcClient xmlrpcClient) Constructor.- Parameters:
xmlrpcClient
- Apache XML-RPC client instance
-
-
Method Details
-
callAndWait
Description copied from interface:SampXmlRpcClient
Makes a synchronous call, waiting for the response and returning the result.- Specified by:
callAndWait
in interfaceSampXmlRpcClient
- Parameters:
method
- XML-RPC method nameparams
- parameters for XML-RPC call (SAMP-compatible)- Returns:
- XML-RPC call return value (SAMP-compatible)
- Throws:
IOException
-
callAndForget
Description copied from interface:SampXmlRpcClient
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
SampXmlRpcClient.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.- Specified by:
callAndForget
in interfaceSampXmlRpcClient
- Parameters:
method
- XML-RPC method nameparams
- parameters for XML-RPC call (SAMP-compatible)- Throws:
IOException
-