AeroGear Android Library 1.1.0

org.jboss.aerogear.android.pipeline
Class AbstractFragmentCallback<T>

java.lang.Object
  extended by org.jboss.aerogear.android.pipeline.AbstractCallback<T>
      extended by org.jboss.aerogear.android.pipeline.AbstractFragmentCallback<T>
Type Parameters:
T -
All Implemented Interfaces:
Serializable, Callback<T>

public abstract class AbstractFragmentCallback<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 fragment will be set to null.

See Also:
Serialized Form

Constructor Summary
AbstractFragmentCallback(Object... params)
          This accepts an arbitrary list of Object and uses Objects to generate a hashcode.
 
Method Summary
protected  android.app.Fragment getFragment()
          This method should be called in the onSuccess or onFailure methods of subclasses.
 void setFragment(android.app.Fragment fragment)
          This method is called by AbstractPipeLoader or AbstractAuthenticationLoader during the onLoadComplete method before onSuccess or onFailure are called.
 
Methods inherited from class org.jboss.aerogear.android.pipeline.AbstractCallback
hashCode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jboss.aerogear.android.Callback
onFailure, onSuccess
 

Constructor Detail

AbstractFragmentCallback

public AbstractFragmentCallback(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 -
Method Detail

getFragment

protected android.app.Fragment getFragment()
This method should be called in the onSuccess or onFailure methods of subclasses.

Returns:
the fragment instance

setFragment

public void setFragment(android.app.Fragment fragment)
This method is called by AbstractPipeLoader or AbstractAuthenticationLoader during the onLoadComplete method before onSuccess or onFailure are called.

Parameters:
fragment -

AeroGear Android Library 1.1.0

Copyright © 2013 JBoss by Red Hat. All Rights Reserved.