
com.laputapp.http.PageCallback Maven / Gradle / Ivy
/**
* Created by YuGang Yang on January 19, 2015.
* Copyright 2007-2015 Laputapp.com. All rights reserved.
*/
package com.laputapp.http;
import java.util.ArrayList;
public abstract class PageCallback extends CallbackDecorator> {
public PageCallback(Callbacks.RequestCallback> requestCallback) {
super(requestCallback);
}
@Override public void success(Response> result, retrofit.client.Response response) {
if (result.isSuccessed()) {
handleData(result);
} else {
onErrorCode(result);
}
super.success(result, response);
}
protected abstract void onErrorCode(Response> response);
protected abstract void handleData(Response> response);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy