Interface ParsableSource

    • Method Detail

      • load

        Optional<ConfigParser.Content> load()
                                     throws ConfigException
        Loads the underlying source data. This method is only called when the source Source.exists().

        The method can be invoked repeatedly, for example during retries. In case the underlying data is gone or does not exist, return an empty optional.

        An instance of T as read from the underlying origin of the data (if it exists)
        ConfigException - in case of errors loading from the underlying origin
      • parser

        Optional<ConfigParser> parser()
        If a parser is configured with this source, return it. The source implementation does not need to handle config parser.
        content parser if one is configured on this source
      • mediaType

        Optional<String> mediaType()
        If media type is configured on this source, or can be guessed from the underlying origin, return it. The media type may be used to locate a ConfigParser if one is not explicitly configured.
        media type if configured or detected from content
      • relativeResolver

        default Function<String,​Optional<InputStream>> relativeResolver()
        Resolve relative resource to the current resource.
        a function to resolve resource name into an input stream