public class SharedLinkAPIConnection extends BoxAPIConnection
DEFAULT_MAX_ATTEMPTS, DEFAULT_MAX_RETRIES| Modifier and Type | Method and Description |
|---|---|
boolean |
canRefresh()
Determines if this connection's access token can be refreshed.
|
String |
getAccessToken()
Gets an access token that can be used to authenticate an API request.
|
boolean |
getAutoRefresh()
Gets whether or not automatic refreshing of this connection's access token is enabled.
|
String |
getBaseUploadURL()
Gets the base upload URL that's used when performing file uploads to Box.
|
String |
getBaseURL()
Gets the base URL that's used when sending requests to the Box API.
|
long |
getExpires()
Gets the amount of time for which this connection's access token is valid.
|
int |
getMaxRequestAttempts()
Deprecated.
getMaxRetryAttempts is preferred because it more clearly gets the number
of times a request should be retried after an error response is received.
|
int |
getMaxRetryAttempts()
Gets the maximum number of times an API request will be retried after an error response
is received.
|
String |
getRefreshToken()
Gets a refresh token that can be used to refresh an access token.
|
String |
getUserAgent()
Gets the user agent that's used when sending requests to the Box API.
|
boolean |
needsRefresh()
Determines if this connection's access token has expired and needs to be refreshed.
|
void |
refresh()
Refresh's this connection's access token using its refresh token.
|
void |
setAccessToken(String accessToken)
Sets the access token to use when authenticating API requests.
|
void |
setAutoRefresh(boolean autoRefresh)
Enables or disables automatic refreshing of this connection's access token.
|
void |
setBaseUploadURL(String baseUploadURL)
Sets the base upload URL to be used when performing file uploads to Box.
|
void |
setBaseURL(String baseURL)
Sets the base URL to be used when sending requests to the Box API.
|
void |
setExpires(long milliseconds)
Sets the amount of time for which this connection's access token is valid before it must be refreshed.
|
void |
setMaxRequestAttempts(int attempts)
Deprecated.
setMaxRetryAttempts is preferred because it more clearly sets the number
of times a request should be retried after an error response is received.
|
void |
setMaxRetryAttempts(int attempts)
Sets the maximum number of times an API request will be retried after an error response
is received.
|
void |
setRefreshToken(String refreshToken)
Sets the refresh token to use when refreshing an access token.
|
void |
setUserAgent(String userAgent)
Sets the user agent to be used when sending requests to the Box API.
|
addListener, asSelf, asUser, authenticate, enableNotifications, getAuthorizationURL, getClientID, getClientSecret, getConnectTimeout, getLastRefresh, getLowerScopedToken, getProxy, getProxyPassword, getProxyUsername, getReadTimeout, getRefreshLock, getRequestInterceptor, getRevokeURL, getTokenURL, notifyError, notifyRefresh, removeCustomHeader, removeListener, restore, restore, revokeToken, save, setConnectTimeout, setCustomHeader, setLastRefresh, setProxy, setProxyPassword, setProxyUsername, setReadTimeout, setRequestInterceptor, setRevokeURL, setTokenURL, suppressNotificationspublic long getExpires()
BoxAPIConnectiongetExpires in class BoxAPIConnectionpublic void setExpires(long milliseconds)
BoxAPIConnectionsetExpires in class BoxAPIConnectionmilliseconds - the number of milliseconds for which the access token is valid.public String getBaseURL()
BoxAPIConnectiongetBaseURL in class BoxAPIConnectionpublic void setBaseURL(String baseURL)
BoxAPIConnectionsetBaseURL in class BoxAPIConnectionbaseURL - a base URLpublic String getBaseUploadURL()
BoxAPIConnectiongetBaseUploadURL in class BoxAPIConnectionpublic void setBaseUploadURL(String baseUploadURL)
BoxAPIConnectionsetBaseUploadURL in class BoxAPIConnectionbaseUploadURL - a base upload URL.public String getUserAgent()
BoxAPIConnectiongetUserAgent in class BoxAPIConnectionpublic void setUserAgent(String userAgent)
BoxAPIConnectionsetUserAgent in class BoxAPIConnectionuserAgent - the user agent.public String getAccessToken()
BoxAPIConnectiongetAccessToken().getAccessToken in class BoxAPIConnectionpublic void setAccessToken(String accessToken)
BoxAPIConnectionsetAccessToken in class BoxAPIConnectionaccessToken - a valid access token to use when authenticating API requests.public String getRefreshToken()
BoxAPIConnectiongetRefreshToken in class BoxAPIConnectionpublic void setRefreshToken(String refreshToken)
BoxAPIConnectionsetRefreshToken in class BoxAPIConnectionrefreshToken - a valid refresh token.public void setAutoRefresh(boolean autoRefresh)
BoxAPIConnectionsetAutoRefresh in class BoxAPIConnectionautoRefresh - true to enable auto token refresh; otherwise false.public boolean getAutoRefresh()
BoxAPIConnectiongetAutoRefresh in class BoxAPIConnection@Deprecated public int getMaxRequestAttempts()
getMaxRequestAttempts in class BoxAPIConnection@Deprecated public void setMaxRequestAttempts(int attempts)
setMaxRequestAttempts in class BoxAPIConnectionattempts - the maximum number of request attempts.public int getMaxRetryAttempts()
getMaxRetryAttempts in class BoxAPIConnectionpublic void setMaxRetryAttempts(int attempts)
setMaxRetryAttempts in class BoxAPIConnectionattempts - the maximum number of request attempts.public boolean canRefresh()
BoxAPIConnectioncanRefresh in class BoxAPIConnectionpublic boolean needsRefresh()
BoxAPIConnectionneedsRefresh in class BoxAPIConnectionpublic void refresh()
BoxAPIConnectionrefresh in class BoxAPIConnection