public class BoxAutoRefreshingSession
extends com.box.androidsdk.content.models.BoxSharedLinkSession
| Modifier and Type | Field and Description |
|---|---|
static long |
ACCESS_TOKEN_MAX_LIFE |
static long |
SUGGESTED_GRACE_PERIOD |
| Constructor and Description |
|---|
BoxAutoRefreshingSession(com.box.androidsdk.content.models.BoxSession session)
Convenience constructor that uses the suggested grace period of 1 minute.
|
BoxAutoRefreshingSession(com.box.androidsdk.content.models.BoxSession session,
long gracePeriod)
Creates a BoxSession that automatically refreshes when the access token is about to expire.
|
| Modifier and Type | Method and Description |
|---|---|
long |
getDelayTillNextRefreshTime() |
void |
onAuthFailure(com.box.androidsdk.content.auth.BoxAuthentication.BoxAuthenticationInfo info,
java.lang.Exception ex) |
void |
onLoggedOut(com.box.androidsdk.content.auth.BoxAuthentication.BoxAuthenticationInfo info,
java.lang.Exception ex) |
void |
onRefreshed(com.box.androidsdk.content.auth.BoxAuthentication.BoxAuthenticationInfo info) |
com.box.androidsdk.content.BoxFutureTask<com.box.androidsdk.content.models.BoxSession> |
refresh() |
void |
startAutoRefreshing() |
void |
stopAutoRefreshing() |
getPassword, getSharedLink, setPassword, setSharedLinkauthenticate, authenticate, clearCache, getApplicationContext, getAuthInfo, getBoxAccountEmail, getCacheDir, getClientId, getClientSecret, getDeviceId, getDeviceName, getManagementData, getRedirectUrl, getRefreshProvider, getRefreshTokenExpiresAt, getUser, getUserAgent, getUserId, isEnabledBoxAppAuthentication, logout, onAuthCreated, setApplicationContext, setAuthInfo, setBoxAccountEmail, setDeviceId, setDeviceName, setEnableBoxAppAuthentication, setManagementData, setRefreshTokenExpiresAt, setSessionAuthListener, setupSession, setUserId, startAuthenticationUI, suppressAuthErrorUIAfterLogin, suppressesAuthErrorUIAfterLoginpublic static final long ACCESS_TOKEN_MAX_LIFE
public static long SUGGESTED_GRACE_PERIOD
public BoxAutoRefreshingSession(com.box.androidsdk.content.models.BoxSession session)
session - a session to copy values from.public BoxAutoRefreshingSession(com.box.androidsdk.content.models.BoxSession session,
long gracePeriod)
session - a session to copy data from.gracePeriod - an amount of time in milliseconds to refresh before estimated expiration time.public long getDelayTillNextRefreshTime()
public void startAutoRefreshing()
public void stopAutoRefreshing()
public com.box.androidsdk.content.BoxFutureTask<com.box.androidsdk.content.models.BoxSession> refresh()
refresh in class com.box.androidsdk.content.models.BoxSessionpublic void onRefreshed(com.box.androidsdk.content.auth.BoxAuthentication.BoxAuthenticationInfo info)
onRefreshed in interface com.box.androidsdk.content.auth.BoxAuthentication.AuthListeneronRefreshed in class com.box.androidsdk.content.models.BoxSessionpublic void onAuthFailure(com.box.androidsdk.content.auth.BoxAuthentication.BoxAuthenticationInfo info,
java.lang.Exception ex)
onAuthFailure in interface com.box.androidsdk.content.auth.BoxAuthentication.AuthListeneronAuthFailure in class com.box.androidsdk.content.models.BoxSessionpublic void onLoggedOut(com.box.androidsdk.content.auth.BoxAuthentication.BoxAuthenticationInfo info,
java.lang.Exception ex)
onLoggedOut in interface com.box.androidsdk.content.auth.BoxAuthentication.AuthListeneronLoggedOut in class com.box.androidsdk.content.models.BoxSession