Class OciConfigConfigSource
- java.lang.Object
-
- io.helidon.integrations.cdi.oci.objectstorage.OciConfigConfigSource
-
- All Implemented Interfaces:
org.eclipse.microprofile.config.spi.ConfigSource
public final class OciConfigConfigSource extends Object implements org.eclipse.microprofile.config.spi.ConfigSource
AConfigSourceimplementation that is backed by aConfigFileAuthenticationDetailsProvider.
-
-
Constructor Summary
Constructors Constructor Description OciConfigConfigSource()Creates a newOciConfigConfigSource.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetName()Returns the name of thisOciConfigConfigSource.intgetOrdinal()Returns the ordinal of thisOciConfigConfigSource.Map<String,String>getProperties()Returns aMapconsisting of all property names and their values that thisOciConfigConfigSourceknows about at the time that this method is invoked.StringgetValue(String propertyName)Returns a value for the suppliedpropertyName, ornullif there is no such value.
-
-
-
Constructor Detail
-
OciConfigConfigSource
public OciConfigConfigSource()
Creates a newOciConfigConfigSource.
-
-
Method Detail
-
getName
public String getName()
Returns the name of thisOciConfigConfigSource.This method never returns
null.This method returns the same value every time it is invoked.
Overrides of this method must not return
null.Overrides of this method must return the same value every time they are invoked.
The default return value of this method is subject to change without notice.
- Specified by:
getNamein interfaceorg.eclipse.microprofile.config.spi.ConfigSource- Returns:
- the name of this
OciConfigConfigSource; nevernull - See Also:
ConfigSource.getName()
-
getOrdinal
public int getOrdinal()
Returns the ordinal of thisOciConfigConfigSource.This implementation returns
101, which will ensure values from thisConfigSourceimplementation will trump those from/META-INF/microprofile-config.propertiesbut none other.- Specified by:
getOrdinalin interfaceorg.eclipse.microprofile.config.spi.ConfigSource- Returns:
- the ordinal of this
OciConfigConfigSource;101by default
-
getValue
public String getValue(String propertyName)
Returns a value for the suppliedpropertyName, ornullif there is no such value.This method may return
null.- Specified by:
getValuein interfaceorg.eclipse.microprofile.config.spi.ConfigSource- Parameters:
propertyName- the name of the property for which a value should be returned; may benullin which casenullwill be returned- Returns:
- a value for the supplied
propertyName, ornull
-
getProperties
public Map<String,String> getProperties()
Returns aMapconsisting of all property names and their values that thisOciConfigConfigSourceknows about at the time that this method is invoked.This method never returns
null.The returned
Mapis immutable and safe for concurrent use by multiple threads.This method may return different
Mapinstances when invoked at different times.The returned
Map, if non-empty, is guaranteed to contain at least the following keys:- oci.auth.fingerprint
- oci.auth.passphraseCharacters
- oci.auth.tenancy
- oci.auth.user
The MicroProfile Config specification does not give any guidance on whether the return value of an implementation of the
ConfigSource.getProperties()method should be immutable and/or threadsafe. This implementation returns an immutableMap.- Specified by:
getPropertiesin interfaceorg.eclipse.microprofile.config.spi.ConfigSource- Returns:
- a non-
nullMapof properties known to thisOciConfigConfigSource - Throws:
IllegalStateException- if there was a problem reading the OCI config file- See Also:
ConfigSource.getProperties()
-
-