com.dg.libs.rest.handlers.BackgroundThreadResponseHandler 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.handlers;
import com.dg.libs.rest.callbacks.HttpCallback;
import com.dg.libs.rest.domain.ResponseStatus;
public class BackgroundThreadResponseHandler implements ResponseHandler {
public static final String TAG = BackgroundThreadResponseHandler.class.getSimpleName();
protected final HttpCallback callback;
public BackgroundThreadResponseHandler(HttpCallback callback) {
this.callback = callback;
}
@Override
public HttpCallback getCallback() {
return callback;
}
@Override
public void handleSuccess(final T responseData) {
if (callback != null) {
callback.onSuccess(responseData);
}
}
@Override
public void handleError(final ResponseStatus status) {
if (callback != null) {
callback.onHttpError(status);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy