@InterfaceAudience.Private @InterfaceStability.Evolving public class AWSCredentialProviderList extends Object implements com.amazonaws.auth.AWSCredentialsProvider, AutoCloseable
AWSCredentialsProviderChain,
except that:
AmazonClientException, that is rethrown, rather than
swallowed.AnonymousAWSCredentials.| Modifier and Type | Field and Description |
|---|---|
static String |
NO_AWS_CREDENTIAL_PROVIDERS |
| Constructor and Description |
|---|
AWSCredentialProviderList()
Empty instance.
|
AWSCredentialProviderList(Collection<com.amazonaws.auth.AWSCredentialsProvider> providers)
Create with an initial list of providers.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(com.amazonaws.auth.AWSCredentialsProvider p)
Add a new provider.
|
void |
checkNotEmpty()
Verify that the provider list is not empty.
|
void |
close()
Close routine will close all providers in the list which implement
Closeable. |
com.amazonaws.auth.AWSCredentials |
getCredentials()
Iterate through the list of providers, to find one with credentials.
|
int |
getRefCount()
Get the current reference count.
|
boolean |
isClosed()
Get the closed flag.
|
String |
listProviderNames()
List all the providers' names.
|
void |
refresh()
Refresh all child entries.
|
AWSCredentialProviderList |
share()
Get a reference to this object with an updated reference count.
|
String |
toString()
The string value is this class name and the string values of nested
providers.
|
public static final String NO_AWS_CREDENTIAL_PROVIDERS
public AWSCredentialProviderList()
public AWSCredentialProviderList(Collection<com.amazonaws.auth.AWSCredentialsProvider> providers)
providers - provider list.public void add(com.amazonaws.auth.AWSCredentialsProvider p)
p - providerpublic void refresh()
refresh in interface com.amazonaws.auth.AWSCredentialsProviderpublic com.amazonaws.auth.AWSCredentials getCredentials()
reuseLastProvider is true, then it is re-used.getCredentials in interface com.amazonaws.auth.AWSCredentialsProviderpublic void checkNotEmpty()
com.amazonaws.AmazonClientException - if there are no providers.public String listProviderNames()
public String toString()
public AWSCredentialProviderList share()
public int getRefCount()
public boolean isClosed()
public void close()
Closeable.
This matters because some providers start a background thread to
refresh their secrets.close in interface AutoCloseableCopyright © 2008–2021 Apache Software Foundation. All rights reserved.