org.jboss.aerogear.android.pipeline
Class AbstractActivityCallback<T>
java.lang.Object
org.jboss.aerogear.android.pipeline.AbstractCallback<T>
org.jboss.aerogear.android.pipeline.AbstractActivityCallback<T>
- Type Parameters:
T -
- All Implemented Interfaces:
- Serializable, Callback<T>
public abstract class AbstractActivityCallback<T>
- extends AbstractCallback<T>
LoaderPipe and AuthenticationModule instances which consume
callbacks of this type will supply it with a Activity instance before
onSuccess or onFailure are called. This should not be done by the user.
These calls are not guaranteed to be thread safe. Instances of the callback
should not be shared among Activities and Fragments.
After onSuccess or onFailure have been called, the activity will be set to null.
- See Also:
- Serialized Form
|
Method Summary |
protected android.app.Activity |
getActivity()
This method should be called in the onSuccess or onFailure methods of
subclasses. |
void |
setActivity(android.app.Activity activity)
This method is called by AbstractPipeLoader
during the onLoadComplete method before onSuccess or onFailure are called. |
AbstractActivityCallback
public AbstractActivityCallback(Object... params)
- This accepts an arbitrary list of Object and uses
Objects to
generate a hashcode. This code is used to provided the loader manager
with a unique value to determine uniqueness of calls to read, etc.
- Parameters:
params -
getActivity
protected android.app.Activity getActivity()
- This method should be called in the onSuccess or onFailure methods of
subclasses.
- Returns:
- the activity instance
setActivity
public void setActivity(android.app.Activity activity)
- This method is called by
AbstractPipeLoader
during the onLoadComplete method before onSuccess or onFailure are called.
- Parameters:
activity -
Copyright © 2013 JBoss by Red Hat. All Rights Reserved.