Class OciConfigConfigSource
- All Implemented Interfaces:
ConfigSource
ConfigSource implementation that is backed by a ConfigFileAuthenticationDetailsProvider.-
Field Summary
Fields inherited from interface org.eclipse.microprofile.config.spi.ConfigSource
CONFIG_ORDINAL, DEFAULT_ORDINAL -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetName()Returns the name of thisOciConfigConfigSource.intReturns the ordinal of thisOciConfigConfigSource.Returns aMapconsisting of all property names and their values that thisOciConfigConfigSourceknows about at the time that this method is invoked.Returns a value for the suppliedpropertyName, ornullif there is no such value.
-
Constructor Details
-
OciConfigConfigSource
public OciConfigConfigSource()Creates a newOciConfigConfigSource.
-
-
Method Details
-
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 interfaceConfigSource- Returns:
- the name of this
OciConfigConfigSource; nevernull - See Also:
-
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 interfaceConfigSource- Returns:
- the ordinal of this
OciConfigConfigSource;101by default
-
getValue
Returns a value for the suppliedpropertyName, ornullif there is no such value.This method may return
null.- Specified by:
getValuein interfaceConfigSource- 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
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 interfaceConfigSource- Returns:
- a non-
nullMapof properties known to thisOciConfigConfigSource - Throws:
IllegalStateException- if there was a problem reading the OCI config file- See Also:
-
getPropertyNames
- Specified by:
getPropertyNamesin interfaceConfigSource
-