Interface Resolver
- All Known Subinterfaces:
SchemaResolver
- All Known Implementing Classes:
ClasspathSchemaResolver,EtcdResolver,FileSchemaResolver,HTTPSchemaResolver,KubernetesSchemaResolver,ResolverMap,RuleResolver
public interface Resolver
-
Method Summary
Modifier and TypeMethodDescriptiongetChildren(String url) Returns the list of child resources of the resource identified by the URL.longgetTimestamp(String url) Returns the modification date of the resource.voidobserveChange(String url, ExceptionThrowingConsumer<InputStream> consumer) Calls the consumer when the InputStream for the requested URL changes.Returns the InputStream for the requested URL.
-
Method Details
-
resolve
Returns the InputStream for the requested URL.- Throws:
ResourceRetrievalException- if the resource identified by the URL does not exist.
-
observeChange
void observeChange(String url, ExceptionThrowingConsumer<InputStream> consumer) throws ResourceRetrievalException Calls the consumer when the InputStream for the requested URL changes.- Throws:
ResourceRetrievalException- if the resource identified by the URL does not exist.
-
getChildren
Returns the list of child resources of the resource identified by the URL.For example, a list of filenames in the directory identified by the URL.
- Returns:
- null if the resolver does not support this functionality.
- Throws:
FileNotFoundException- if the resource identified by the URL does not exist.
-
getTimestamp
Returns the modification date of the resource.- Returns:
- 0 if the resolver does not support this functionality.
- Throws:
FileNotFoundException- if the resource identified by the URL does not exist.
-