aboutsummaryrefslogtreecommitdiff
path: root/WordPress/src/main/java/org/xmlrpc/android/XMLRPCCallback.java
blob: 45471f8dca7352acfd78f390d9beeffdadfff266 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package org.xmlrpc.android;

/**
 * The XMLRPCCallback interface must be implemented by a listener for an
 * asynchronous call to a server method.
 * When the server responds, the corresponding method on the listener is called.
 *
 * @author Tim Roes
 */
public interface XMLRPCCallback {
	/**
	 * This callback is called whenever the server successfully responds.
	 *
	 * @param id The id as returned by the XMLRPCClient.asyncCall(..) method for this request.
	 * @param result The Object returned from the server.
	 */
	public void onSuccess(long id, Object result);

	/**
	 * This callback is called whenever an error occurs during the method call.
	 *
	 * @param id The id as returned by the XMLRPCClient.asyncCall(..) method for this request.
	 * @param error The error occured.
	 */
	public void onFailure(long id, Exception error);
}