public class ProfileCredentialsProvider extends Object implements CredentialsProvider
构造器和说明 |
---|
ProfileCredentialsProvider()
Creates a new profile credentials provider that returns the OSS security
credentials configured for the default profile.
|
ProfileCredentialsProvider(ProfileConfigFile profilesConfigFile,
String profileName)
Creates a new profile credentials provider that returns the OSS security
credentials for the specified profiles configuration file and profile
name.
|
ProfileCredentialsProvider(String profileName)
Creates a new profile credentials provider that returns the OSS security
credentials configured for the named profile.
|
ProfileCredentialsProvider(String profilesConfigFilePath,
String profileName)
Creates a new profile credentials provider that returns the OSS security
credentials for the specified profiles configuration file and profile
name.
|
限定符和类型 | 方法和说明 |
---|---|
Credentials |
getCredentials() |
long |
getRefreshForceIntervalMillis()
Gets the forced refresh interval in milliseconds.
|
long |
getRefreshIntervalMillis()
Gets the refresh interval in milliseconds.
|
void |
refresh() |
void |
setCredentials(Credentials creds) |
void |
setRefreshForceIntervalMillis(long refreshForceIntervalMillis)
Sets the forced refresh interval in milliseconds.
|
void |
setRefreshIntervalNanos(long refreshIntervalMillis)
Sets the refresh interval in milliseconds.
|
public ProfileCredentialsProvider()
public ProfileCredentialsProvider(String profileName)
profileName
- The name of a local configuration profile.public ProfileCredentialsProvider(String profilesConfigFilePath, String profileName)
profilesConfigFilePath
- The file path where the profile configuration file is located.profileName
- The name of a configuration profile in the specified
configuration file.public ProfileCredentialsProvider(ProfileConfigFile profilesConfigFile, String profileName)
profilesConfigFile
- The profile configuration file containing the profiles used by
this credentials provider or null to defer load to first use.profileName
- The name of a configuration profile in the specified
configuration file.public void setCredentials(Credentials creds)
setCredentials
在接口中 CredentialsProvider
public Credentials getCredentials()
getCredentials
在接口中 CredentialsProvider
public void refresh()
public long getRefreshIntervalMillis()
public void setRefreshIntervalNanos(long refreshIntervalMillis)
refreshIntervalMillis
- milliseconds.public long getRefreshForceIntervalMillis()
public void setRefreshForceIntervalMillis(long refreshForceIntervalMillis)
refreshForceIntervalMillis
- milliseconds.Copyright © 2019. All Rights Reserved.