All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.kubatatami.judonetworking.observers.CallbackWrapper Maven / Gradle / Ivy

There is a newer version: 2.1
Show newest version
package com.github.kubatatami.judonetworking.observers;

import com.github.kubatatami.judonetworking.Callback;
import com.github.kubatatami.judonetworking.CallbackInterface;
import com.github.kubatatami.judonetworking.exceptions.JudoException;

/**
 * Created by Kuba on 17/03/14.
 */
public class CallbackWrapper extends Callback {

    protected CallbackInterface baseCallback;

    public CallbackWrapper(CallbackInterface baseCallback) {
        this.baseCallback = baseCallback;
    }

    @Override
    public void onStart() {
        baseCallback.onStart();
    }

    @Override
    public void onSuccess(T result) {
        baseCallback.onSuccess(result);
    }

    @Override
    public void onError(JudoException e) {
        baseCallback.onError(e);
    }

    @Override
    public void onFinish() {
        baseCallback.onFinish();
    }

    @Override
    public void onProgress(int progress) {
        baseCallback.onProgress(progress);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy