com.github.kubatatami.judonetworking.observers.CallbackWrapper Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of judonetworking-observers Show documentation
Show all versions of judonetworking-observers Show documentation
Easy way of communicating to your servers.
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);
}
}