Back to project page cloudmine-android.
The source code is released under:
Copyright (c) 2012 CloudMine LLC, http://cloudmine.me Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software")...
If you think the Android project cloudmine-android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.cloudmine.api.rest.callbacks; /* w w w . j a v a 2 s. co m*/ import com.cloudmine.api.loopj.AsyncHttpResponseHandler; import com.cloudmine.api.rest.response.ResponseConstructor; /** * A wrapper around Callback that makes it work with the AsyncHttp library. Should not * be extended. * <br>Copyright CloudMine LLC. All rights reserved<br> See LICENSE file included with SDK for details. */ public final class AndroidCallback<T> extends AsyncHttpResponseHandler<T> implements Callback<T> { private final Callback callback; public AndroidCallback(ResponseConstructor<T> constructor) { this(CMCallback.doNothing(), constructor); } public AndroidCallback(Callback callback, ResponseConstructor<T> constructor) { super(constructor); this.callback = callback; } @Override public void onCompletion(T response) { callback.onCompletion(response); } @Override public void onFailure(Throwable error, String message) { callback.onFailure(error, message); } @Override public void setStartTime(long startTime) { callback.setStartTime(startTime); } @Override public long getStartTime() { return callback.getStartTime(); } }