public class JsonCredentialsProvider extends Object implements AWSCredentialsProvider
JsonConfigFile
Constructor and Description |
---|
JsonCredentialsProvider()
Creates a new json credentials provider that returns the IBM security credentials.
|
JsonCredentialsProvider(JsonConfigFile jsonConfigFile)
Creates a new json credentials provider that returns the IBM security credentials.
|
JsonCredentialsProvider(String jsonConfigFilePath)
Creates a new json credentials provider that returns the IBM security credentials.
|
Modifier and Type | Method and Description |
---|---|
AWSCredentials |
getCredentials()
Returns AWSCredentials which the caller can use to authorize an AWS request.
|
long |
getRefreshForceIntervalNanos()
Gets the forced refresh interval in nanoseconds.
|
long |
getRefreshIntervalNanos()
Gets the refresh interval in nanoseconds.
|
void |
refresh()
Forces this credentials provider to refresh its credentials.
|
void |
setRefreshForceIntervalNanos(long refreshForceIntervalNanos)
Sets the forced refresh interval in nanoseconds.
|
void |
setRefreshIntervalNanos(long refreshIntervalNanos)
Sets the refresh interval in nanoseconds.
|
String |
toString() |
public JsonCredentialsProvider()
public JsonCredentialsProvider(String jsonConfigFilePath)
jsonConfigFilePath
- The file path where the json configuration file is located.public JsonCredentialsProvider(JsonConfigFile jsonConfigFile)
jsonConfigFile
- The json configuration file containing the credentials used by this
credentials provider or null to defer load to first use.public AWSCredentials getCredentials()
AWSCredentialsProvider
getCredentials
in interface AWSCredentialsProvider
public void refresh()
AWSCredentialsProvider
refresh
in interface AWSCredentialsProvider
public long getRefreshIntervalNanos()
public void setRefreshIntervalNanos(long refreshIntervalNanos)
refreshIntervalNanos
- nanosecondspublic long getRefreshForceIntervalNanos()
public void setRefreshForceIntervalNanos(long refreshForceIntervalNanos)
Copyright © 2024. All rights reserved.