public final class CustomTokenProviderAdapter extends AccessTokenProvider implements BoundDTExtension
| Constructor and Description |
|---|
CustomTokenProviderAdapter(CustomTokenProviderAdaptee adaptee,
int customTokenFetchRetryCount)
Constructs a token provider based on the custom token provider.
|
| Modifier and Type | Method and Description |
|---|---|
void |
bind(URI fsURI,
org.apache.hadoop.conf.Configuration conf)
Bind to the filesystem by passing the binding call on
to any custom token provider adaptee which implements
BoundDTExtension. |
void |
close() |
String |
getUserAgentSuffix()
Get a suffix for the UserAgent suffix of HTTP requests, which
can be used to identify the principal making ABFS requests.
|
protected AzureADToken |
refreshToken()
the method to fetch the access token.
|
getToken, isTokenAboutToExpireclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetCanonicalServiceNamepublic CustomTokenProviderAdapter(CustomTokenProviderAdaptee adaptee, int customTokenFetchRetryCount)
adaptee - the custom token providercustomTokenFetchRetryCount - max retry count for customTokenFetchprotected AzureADToken refreshToken() throws IOException
AccessTokenProviderrefreshToken in class AccessTokenProviderAzureADToken containing the access tokenIOException - if there is an error fetching the tokenpublic void bind(URI fsURI, org.apache.hadoop.conf.Configuration conf) throws IOException
BoundDTExtension.
No-op if they don't.bind in interface BoundDTExtensionfsURI - URI of the filesystem.conf - configuration of this extension.IOException - failure.public void close()
close in interface Closeableclose in interface AutoCloseablepublic String getUserAgentSuffix()
getUserAgentSuffix in interface BoundDTExtensionCopyright © 2008–2021 Apache Software Foundation. All rights reserved.