org.solovyev.android.tasks
Interface ContextCallback<C extends android.content.Context,V>

Type Parameters:
C - type of context
V - type of result
All Known Subinterfaces:
ContextTask<C,V>, NamedContextTask<C,V>
All Known Implementing Classes:
TaskOverlayDialog

public interface ContextCallback<C extends android.content.Context,V>

Callback to be used for notifying activity (or fragments or views in it) about task result. After implementation of this interface see Tasks#toUiThreadFutureCallback(C, ContextCallback < C ,V>) for conversion it to FutureCallback.

IMPLEMENTATION NOTE: please fo not implement this class as inner anonymous class of activity (fragment/view) as it will have a reference to activity (fragment/view) which will cause memory leak. As a rule ALWAYS use it in the static context.


Method Summary
 void onFailure(C context, Throwable t)
           
 void onSuccess(C context, V result)
           
 

Method Detail

onSuccess

void onSuccess(@Nonnull
               C context,
               V result)

onFailure

void onFailure(@Nonnull
               C context,
               Throwable t)


Copyright © 2013. All Rights Reserved.