com.facebook
Class NonCachingTokenCachingStrategy

java.lang.Object
  extended by com.facebook.TokenCachingStrategy
      extended by com.facebook.NonCachingTokenCachingStrategy

public class NonCachingTokenCachingStrategy
extends TokenCachingStrategy

Implements a trivial TokenCachingStrategy that does not actually cache any tokens. It is intended for use when an access token may be used on a temporary basis but should not be cached for future use (for instance, when handling a deep link).


Field Summary
 
Fields inherited from class com.facebook.TokenCachingStrategy
EXPIRATION_DATE_KEY, LAST_REFRESH_DATE_KEY, PERMISSIONS_KEY, TOKEN_KEY, TOKEN_SOURCE_KEY, USER_FBID_KEY
 
Constructor Summary
NonCachingTokenCachingStrategy()
           
 
Method Summary
 void clear()
          Called when a Session learns its token is no longer valid or during a call to closeAndClearTokenInformation to clear the durable state associated with the token.
 Bundle load()
          Called during Session construction to get the token state.
 void save(Bundle bundle)
          Called when a Session updates its token.
 
Methods inherited from class com.facebook.TokenCachingStrategy
getExpirationDate, getExpirationMilliseconds, getLastRefreshDate, getLastRefreshMilliseconds, getPermissions, getSource, getToken, hasTokenInformation, putExpirationDate, putExpirationMilliseconds, putLastRefreshDate, putLastRefreshMilliseconds, putPermissions, putSource, putToken
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NonCachingTokenCachingStrategy

public NonCachingTokenCachingStrategy()
Method Detail

load

public Bundle load()
Description copied from class: TokenCachingStrategy
Called during Session construction to get the token state. Typically this is loaded from a persistent store that was previously initialized via save. The caller may choose to keep a reference to the returned Bundle indefinitely. Therefore the TokenCachingStrategy should not store the returned Bundle and should return a new Bundle on every call to this method.

Specified by:
load in class TokenCachingStrategy
Returns:
A Bundle that represents the token state that was loaded.

save

public void save(Bundle bundle)
Description copied from class: TokenCachingStrategy
Called when a Session updates its token. This is passed a Bundle of values that should be stored durably for the purpose of being returned from a later call to load. Some implementations may choose to store bundle beyond the scope of this call, so the caller should keep no references to the bundle to ensure that it is not modified later.

Specified by:
save in class TokenCachingStrategy
Parameters:
bundle - A Bundle that represents the token state to be saved.

clear

public void clear()
Description copied from class: TokenCachingStrategy
Called when a Session learns its token is no longer valid or during a call to closeAndClearTokenInformation to clear the durable state associated with the token.

Specified by:
clear in class TokenCachingStrategy