Code example for Future

Methods: cancelisCancelled

    public void cancel() { 
        if (!isCancelled()) { 
            // Here we do not want to force the task to be interrupted. Indeed, 
            // it may be useful to keep the result in a cache for a further use 
            if (mCallback != null) {
    public final boolean isCancelled() { 
        return mFuture.isCancelled();
    private class InnerCallback implements ImageLoaderCallback { 
        public void onImageLoadingStarted(ImageLoader loader) {
            if (mCallback != null) {
Connect your IDE to all the code out there  Get Codota for Java