- All Superinterfaces:
- All Known Implementing Classes:
public interface ParsableSource extends Source
An eager source that can read all data from the underlying origin as a stream that can be parsed based on its media type (or using an explicit
Nested Class Summary
Method SummaryModifier and TypeMethodDescription
load()Loads the underlying source data.If media type is configured on this source, or can be guessed from the underlying origin, return it.
parser()If a parser is configured with this source, return it.Resolve relative resource to the current resource.
loadLoads the underlying source data. This method is only called when the source
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
Tas read from the underlying origin of the data (if it exists)
ConfigException- in case of errors loading from the underlying origin
parserIf 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
mediaTypeIf 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
ConfigParserif one is not explicitly configured.
- media type if configured or detected from content
relativeResolverResolve relative resource to the current resource.
- a function to resolve resource name into an input stream