redstone.xmlrpc
Interface XmlRpcCallback


public interface XmlRpcCallback

Callback interface to implement when using asynchronous invocations with XmlRpcClient. The XmlRpcClient will call either onResult(), onFault(), or onException() based on the outcome of the invocation.

Author:
Greger Olsson

Method Summary
 void onException(XmlRpcException exception)
          Called by the XmlRpcClient when an exception was raised during the call.
 void onFault(int faultCode, java.lang.String faultMessage)
          Called by the XmlRpcClient when a fault response was received from the server.
 void onResult(java.lang.Object result)
          Called by the XmlRpcClient when a response was received from the server.
 

Method Detail

onResult

void onResult(java.lang.Object result)
Called by the XmlRpcClient when a response was received from the server.

Parameters:
result - The object containing the result value.

onFault

void onFault(int faultCode,
             java.lang.String faultMessage)
Called by the XmlRpcClient when a fault response was received from the server.

Parameters:
faultCode - The error code reported by the XML-RPC service.
faultMessage - The error message reported by the XML-RPC service.

onException

void onException(XmlRpcException exception)
Called by the XmlRpcClient when an exception was raised during the call. This only includes exceptions occurring locally. Remote exceptions are transported as XML-RPC faults and are reported through the onFault() callback.

Parameters:
exception - The local exception which can be the result of network problems, or problems with the XML payload and serialization.