public class InternalClient extends java.lang.Object implements SampXmlRpcClient
| Modifier and Type | Class and Description |
|---|---|
private static class |
InternalClient.XmlRpcFault
IOException representing an incoming XML-RPC fault.
|
| Modifier and Type | Field and Description |
|---|---|
private java.net.URL |
endpoint_ |
private static java.util.logging.Logger |
logger_ |
private java.lang.String |
userAgent_ |
| Constructor and Description |
|---|
InternalClient(java.net.URL endpoint)
Constructor.
|
| Modifier and Type | Method and 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.
|
protected java.lang.Object |
deserializeResponse(java.io.InputStream in)
Deserializes an XML-RPC
methodResponse document to a
Java object. |
protected byte[] |
serializeCall(java.lang.String method,
java.util.List paramList)
Generates the XML
methodCall document corresponding
to an XML-RPC method call. |
private final java.net.URL endpoint_
private final java.lang.String userAgent_
private static final java.util.logging.Logger logger_
public InternalClient(java.net.URL endpoint)
endpoint - endpointpublic java.lang.Object callAndWait(java.lang.String method,
java.util.List params)
throws java.io.IOException
SampXmlRpcClientcallAndWait in interface SampXmlRpcClientmethod - XML-RPC method nameparams - parameters for XML-RPC call (SAMP-compatible)java.io.IOExceptionpublic void callAndForget(java.lang.String method,
java.util.List params)
throws java.io.IOException
SampXmlRpcClientNOTE: 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 SampXmlRpcClientmethod - XML-RPC method nameparams - parameters for XML-RPC call (SAMP-compatible)java.io.IOExceptionprotected byte[] serializeCall(java.lang.String method,
java.util.List paramList)
throws java.io.IOException
methodCall document corresponding
to an XML-RPC method call.method - methodName stringparamList - list of XML-RPC parametersjava.io.IOExceptionprotected java.lang.Object deserializeResponse(java.io.InputStream in)
throws java.io.IOException
methodResponse document to a
Java object.in - input stream containing response documentjava.io.IOException