Package io.helidon.config.spi
Interface ConfigContext
-
public interface ConfigContext
Context created by aConfig.Builder
as it constructs aConfig
.The context is typically used in implementations of
io.helidon.config.spi
interfaces to share common information.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Optional<ConfigParser>
findParser(String mediaType)
Returns the first appropriateConfigParser
instance that supports the specifiedcontent media type
.
-
-
-
Method Detail
-
findParser
Optional<ConfigParser> findParser(String mediaType)
Returns the first appropriateConfigParser
instance that supports the specifiedcontent media type
.Note that the application can explicitly register parsers with a builder by invoking the
Config.Builder.addParser(ConfigParser)
method. The config system also loads parsers using the JavaServiceLoader
mechanism and automatically registers such loaded parsers with eachBuilder
unless the application has invoked theConfig.Builder.disableParserServices()
method.- Parameters:
mediaType
- a media type for which a parser is needed- Returns:
Optional<ConfigParser>
(Optional.empty()
if no appropriate parser exists)
-
-