public final class CommunicationTokenRefreshOptions
extends java.lang.Object
This class is used to define how CommunicationTokenCredential should be refreshed
| Constructor and Description |
|---|
CommunicationTokenRefreshOptions(java.util.concurrent.Callable<java.lang.String> tokenRefresher,
boolean refreshProactively)
Creates a
CommunicationTokenRefreshOptions object |
CommunicationTokenRefreshOptions(java.util.concurrent.Callable<java.lang.String> tokenRefresher,
boolean refreshProactively,
java.lang.String initialToken)
Creates a
CommunicationTokenRefreshOptions object |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getInitialToken() |
java.util.concurrent.Callable<java.lang.String> |
getTokenRefresher() |
boolean |
isRefreshProactively() |
public CommunicationTokenRefreshOptions(java.util.concurrent.Callable<java.lang.String> tokenRefresher,
boolean refreshProactively)
CommunicationTokenRefreshOptions object
Access token will be fetched on demand and may optionally enable proactive refreshing
tokenRefresher - the token refresher to provide capacity to fetch fresh token, cannot be nullrefreshProactively - when set to true, turn on proactive fetching to call
tokenRefresher before token expiry by minutes set
with setCallbackOffsetMinutes or default value of
two minutespublic CommunicationTokenRefreshOptions(java.util.concurrent.Callable<java.lang.String> tokenRefresher,
boolean refreshProactively,
java.lang.String initialToken)
CommunicationTokenRefreshOptions object
A valid token is supplied and may optionally enable proactive refreshing
tokenRefresher - the token refresher to provide capacity to fetch fresh token, cannot be nullrefreshProactively - when set to true, turn on proactive fetching to call
tokenRefresher before token expiry by minutes set
with setCallbackOffsetMinutes or default value of
two minutesinitialToken - the serialized JWT token, cannot be nulljava.lang.IllegalArgumentException - if the parameter tokenRefresher or initialToken is null.public java.util.concurrent.Callable<java.lang.String> getTokenRefresher()
public boolean isRefreshProactively()
public java.lang.String getInitialToken()