org.astrogrid.samp.xmlrpc.internal
Class InternalClient

java.lang.Object
  extended byorg.astrogrid.samp.xmlrpc.internal.InternalClient
All Implemented Interfaces:
SampXmlRpcClient

public class InternalClient
extends Object
implements SampXmlRpcClient

XML-RPC client implementation suitable for use with SAMP. This implementation is completely freestanding and requires no other libraries.

Since:
26 Aug 2008
Author:
Mark Taylor

Constructor Summary
InternalClient(URL endpoint)
          Constructor.
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InternalClient

public InternalClient(URL endpoint)
Constructor.

Parameters:
endpoint - endpoint
Method Detail

callAndWait

public Object callAndWait(String method,
                          List params)
                   throws IOException
Description copied from interface: SampXmlRpcClient
Makes a synchronous call, waiting for the response and returning the result.

Specified by:
callAndWait in interface SampXmlRpcClient
Parameters:
method - XML-RPC method name
params - parameters for XML-RPC call (SAMP-compatible)
Returns:
XML-RPC call return value (SAMP-compatible)
Throws:
IOException

callAndForget

public void callAndForget(String method,
                          List params)
                   throws IOException
Description copied from interface: SampXmlRpcClient
Sends a call, but does not wait around for the response. If possible, this method should complete quickly.

Specified by:
callAndForget in interface SampXmlRpcClient
Parameters:
method - XML-RPC method name
params - parameters for XML-RPC call (SAMP-compatible)
Throws:
IOException


Copyright © 2008 AstroGrid. All Rights Reserved.