Class AbstractConfigSource

    • Constructor Detail

      • AbstractConfigSource

        protected AbstractConfigSource​(AbstractConfigSourceBuilder<?,​?> builder)
        Use common data from the builder to setup media type, parser, media type mapping, and parser mapping on this instance. Additional common data is handled by AbstractSource(AbstractSourceBuilder).
        Parameters:
        builder - builder used to set up this config source
    • Method Detail

      • mediaType

        protected Optional<String> mediaType()
        Media type if on eis configured for parsing content of ParsableSource. If there is none configured (default), a parser is chosen based on ConfigParser.Content.mediaType() - media type detected during load of data.
        Returns:
        configured media type or empty if none configured
      • parser

        protected Optional<ConfigParser> parser()
        Config parser if one is configured to use for parsing content of ParsableSource. If one is not configured on a source (default), a parser is chosen based on mediaType().
        Returns:
        a configured parser, or empty if one should be chosen from media type (or if this is not a parsable source)