Class ChainedSigV4PropertiesProvider
- java.lang.Object
-
- com.amazon.neptune.gremlin.driver.sigv4.ChainedSigV4PropertiesProvider
-
public class ChainedSigV4PropertiesProvider extends Object
A chained Sig4Properties provider. It tries to get the properties from environment variables and if not found looks in Java system properties.
-
-
Constructor Summary
Constructors Constructor Description ChainedSigV4PropertiesProvider()Creates an instance with default suppliers.ChainedSigV4PropertiesProvider(Supplier<SigV4Properties>[] providers)Creates an instance with the supplied chain ofSigV4Propertiesproviders.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SigV4PropertiesgetSigV4Properties()Gets theSigV4Propertiesfrom the chain of lambdas.SigV4PropertiesgetSigV4PropertiesFromEnv()Reads the SigV4 properties from the environment properties and constructs theSigV4Propertiesobject.SigV4PropertiesgetSigV4PropertiesFromSystem()Reads the SigV4 properties from the system properties and constructs theSigV4Propertiesobject.
-
-
-
Constructor Detail
-
ChainedSigV4PropertiesProvider
public ChainedSigV4PropertiesProvider()
Creates an instance with default suppliers.
-
ChainedSigV4PropertiesProvider
public ChainedSigV4PropertiesProvider(Supplier<SigV4Properties>[] providers)
Creates an instance with the supplied chain ofSigV4Propertiesproviders.- Parameters:
providers- the chain of sigv4 properties provider.
-
-
Method Detail
-
getSigV4Properties
public SigV4Properties getSigV4Properties() throws SigV4PropertiesNotFoundException
Gets theSigV4Propertiesfrom the chain of lambdas.- Returns:
- the
SigV4Properties. - Throws:
SigV4PropertiesNotFoundException- when SigV4 properties are not set.
-
getSigV4PropertiesFromEnv
public SigV4Properties getSigV4PropertiesFromEnv() throws SigV4PropertiesNotFoundException
Reads the SigV4 properties from the environment properties and constructs theSigV4Propertiesobject.- Returns:
- the
SigV4Propertiesconstructed from system properties. - Throws:
SigV4PropertiesNotFoundException- when properties are not found in the environment variables.
-
getSigV4PropertiesFromSystem
public SigV4Properties getSigV4PropertiesFromSystem()
Reads the SigV4 properties from the system properties and constructs theSigV4Propertiesobject.- Returns:
- the
SigV4Propertiesconstructed from system properties. - Throws:
SigV4PropertiesNotFoundException- when the properties are not found in the system properties.
-
-