public class InternalClient extends Object implements SampXmlRpcClient
Constructor and Description |
---|
InternalClient(URL endpoint)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
callAndForget(String method,
List params)
Sends a call, but does not wait around for the response.
|
Object |
callAndWait(String method,
List params)
Makes a synchronous call, waiting for the response and returning
the result.
|
protected Object |
deserializeResponse(InputStream in)
Deserializes an XML-RPC
methodResponse document to a
Java object. |
protected byte[] |
serializeCall(String method,
List paramList)
Generates the XML
methodCall document corresponding
to an XML-RPC method call. |
public InternalClient(URL endpoint)
endpoint
- endpointpublic Object callAndWait(String method, List params) throws IOException
SampXmlRpcClient
callAndWait
in interface SampXmlRpcClient
method
- XML-RPC method nameparams
- parameters for XML-RPC call (SAMP-compatible)IOException
public void callAndForget(String method, List params) throws IOException
SampXmlRpcClient
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.
callAndForget
in interface SampXmlRpcClient
method
- XML-RPC method nameparams
- parameters for XML-RPC call (SAMP-compatible)IOException
protected byte[] serializeCall(String method, List paramList) throws IOException
methodCall
document corresponding
to an XML-RPC method call.method
- methodName stringparamList
- list of XML-RPC parametersIOException
protected Object deserializeResponse(InputStream in) throws IOException
methodResponse
document to a
Java object.in
- input stream containing response documentIOException
Copyright © 2008–2024. All rights reserved.