public class SharedPreferencesTokenCachingStrategy extends TokenCachingStrategy
EXPIRATION_DATE_KEY, LAST_REFRESH_DATE_KEY, PERMISSIONS_KEY, TOKEN_KEY, TOKEN_SOURCE_KEY, USER_FBID_KEY| Constructor and Description |
|---|
SharedPreferencesTokenCachingStrategy(android.content.Context context)
Creates a default
SharedPreferencesTokenCachingStrategy
instance that provides access to a single set of token information. |
SharedPreferencesTokenCachingStrategy(android.content.Context context,
String cacheKey)
Creates a
SharedPreferencesTokenCachingStrategy instance
that is distinct for the passed in cacheKey. |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clears out all token information stored in this cache.
|
android.os.Bundle |
load()
Returns a Bundle that contains the information stored in this cache
|
void |
save(android.os.Bundle bundle)
Persists all supported data types present in the passed in Bundle, to the
cache
|
getExpirationDate, getExpirationMilliseconds, getLastRefreshDate, getLastRefreshMilliseconds, getPermissions, getSource, getToken, hasTokenInformation, putExpirationDate, putExpirationMilliseconds, putLastRefreshDate, putLastRefreshMilliseconds, putPermissions, putSource, putTokenpublic SharedPreferencesTokenCachingStrategy(android.content.Context context)
SharedPreferencesTokenCachingStrategy
instance that provides access to a single set of token information.context - The Context object to use to get the SharedPreferences object.NullPointerException - if the passed in Context is nullpublic SharedPreferencesTokenCachingStrategy(android.content.Context context,
String cacheKey)
SharedPreferencesTokenCachingStrategy instance
that is distinct for the passed in cacheKey.context - The Context object to use to get the SharedPreferences object.cacheKey - Identifies a distinct set of token information.NullPointerException - if the passed in Context is nullpublic android.os.Bundle load()
load in class TokenCachingStrategypublic void save(android.os.Bundle bundle)
save in class TokenCachingStrategybundle - The Bundle containing information to be cachedpublic void clear()
clear in class TokenCachingStrategyCopyright © 2013. All Rights Reserved.