1 package de.timroes.axmlrpc; 2 3 /** 4 * The XMLRPCCallback interface must be implemented by a listener for an 5 * asynchronous call to a server method. 6 * When the server responds, the corresponding method on the listener is called. 7 * 8 * @author Tim Roes 9 */ 10 public interface XMLRPCCallback { 11 12 /** 13 * This callback is called whenever the server successfully responds. 14 * 15 * @param id The id as returned by the XMLRPCClient.asyncCall(..) method for this request. 16 * @param result The Object returned from the server. 17 */ onResponse(long id, Object result)18 public void onResponse(long id, Object result); 19 20 /** 21 * This callback is called whenever an error occurs during the method call. 22 * 23 * @param id The id as returned by the XMLRPCClient.asyncCall(..) method for this request. 24 * @param error The error occured. 25 */ onError(long id, XMLRPCException error)26 public void onError(long id, XMLRPCException error); 27 28 /** 29 * This callback is called whenever the server returns an error. 30 * 31 * @param id The id as returned by the XMLRPCClient.asyncCall(..) method for this request. 32 * @param error The error returned from the server. 33 */ onServerError(long id, XMLRPCServerException error)34 public void onServerError(long id, XMLRPCServerException error); 35 36 } 37