com.dg.libs.rest.callbacks.HttpCallback Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of android-rest Show documentation
Show all versions of android-rest Show documentation
This is a library for android for Making RestFul Requests
package com.dg.libs.rest.callbacks;
import com.dg.libs.rest.domain.ResponseStatus;
/**
* The {@link HttpCallback} interface is used for HTTP request notification. It
* contains methods that describe the error if the callback fails and return
* response data if the callback succeeds.
*
* @param
* Parameter that indicates which object the callback returns. It can
* be of any type.
*/
public interface HttpCallback {
/**
* This method shows that the callback successfully finished. It contains
* response data which represents the return type of the callback.
*
* @param responseData
* It can be of any type.
*/
public void onSuccess(T responseData);
/**
* This method shows that the callback has failed due to server issue, no
* connectivity or parser error
*
* @param responseCode
*/
public void onHttpError(ResponseStatus responseCode);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy