|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ContextT
- ProgressT
- ReturnT
- public interface IgnitedAsyncTaskHandler<ContextT extends android.content.Context,ProgressT,ReturnT>
To be implemented by classes that whish to receive callbacks about task status and progress
updates. Note that if this class is a Context
, you can use the simpler
IgnitedAsyncTaskContextHandler
instead.
It's best to not implement this interface yourself, but instead inherit from
IgnitedAsyncTaskDefaultHandler
, since it already handles the context reference for you.
In any case, take extreme caution to not keep a strong reference to any Context in your
implementation, since otherwise it will leak during Activity configuration changes! This includes
keeping strong references to Views and any other framework classes that bind to the current
context.
Method Summary | |
---|---|
ContextT |
getContext()
|
boolean |
onTaskCompleted(ContextT context,
ReturnT result)
Return true from this method if you want to swallow the event; it will then not be passed on to the task itself. |
boolean |
onTaskFailed(ContextT context,
Exception error)
Return true from this method if you want to swallow the event; it will then not be passed on to the task itself. |
boolean |
onTaskProgress(ContextT context,
ProgressT... progress)
Return true from this method if you want to swallow the event; it will then not be passed on to the task itself. |
boolean |
onTaskStarted(ContextT context)
Return true from this method if you want to swallow the event; it will then not be passed on to the task itself. |
boolean |
onTaskSuccess(ContextT context,
ReturnT result)
Return true from this method if you want to swallow the event; it will then not be passed on to the task itself. |
void |
setContext(ContextT context)
|
Method Detail |
---|
ContextT getContext()
void setContext(ContextT context)
boolean onTaskStarted(ContextT context)
boolean onTaskProgress(ContextT context, ProgressT... progress)
boolean onTaskCompleted(ContextT context, ReturnT result)
boolean onTaskSuccess(ContextT context, ReturnT result)
boolean onTaskFailed(ContextT context, Exception error)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |