@InterfaceAudience.Private public abstract class AbstractSessionCredentialsProvider extends AbstractAWSCredentialProvider
Modifier and Type | Class and Description |
---|---|
protected static class |
AbstractSessionCredentialsProvider.NoCredentials
A special set of null credentials which are not the anonymous class.
|
Constructor and Description |
---|
AbstractSessionCredentialsProvider(URI uri,
org.apache.hadoop.conf.Configuration conf)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected abstract software.amazon.awssdk.auth.credentials.AwsCredentials |
createCredentials(org.apache.hadoop.conf.Configuration config)
Implementation point: whatever the subclass must do to load credentials.
|
IOException |
getInitializationException()
Get any IOE raised during initialization.
|
boolean |
hasCredentials() |
protected void |
init()
Initialize the credentials by calling
createCredentials(Configuration) with the current config. |
boolean |
isInitialized()
Has an attempt to initialize the credentials been attempted?
|
software.amazon.awssdk.auth.credentials.AwsCredentials |
resolveCredentials()
Get the credentials.
|
String |
toString() |
getConf, getUri
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
@Retries.OnceTranslated protected void init() throws IOException
createCredentials(Configuration)
with the current config.IOException
- on any failure.public boolean isInitialized()
init()
was called.protected abstract software.amazon.awssdk.auth.credentials.AwsCredentials createCredentials(org.apache.hadoop.conf.Configuration config) throws IOException
init()
and then the credentials are cached,
along with any exception.config
- the configurationIOException
- on any failure.public software.amazon.awssdk.auth.credentials.AwsCredentials resolveCredentials() throws software.amazon.awssdk.core.exception.SdkException
createCredentials(Configuration)
is thrown here before any attempt to return the credentials
is made.software.amazon.awssdk.core.exception.SdkException
- if one was raised during initCredentialInitializationException
- on other failures.public final boolean hasCredentials()
@VisibleForTesting public IOException getInitializationException()
init()
hasn't been called, or it actually worked.Copyright © 2008–2024 Apache Software Foundation. All rights reserved.