@FunctionalInterface public interface SchemaClient extends Function<String,InputStream>
SchemaLoader
to fetch the contents denoted by remote JSON
pointer.
Implementations are expected to support the HTTP/1.1 protocol, the support of other protocols is optional.
Modifier and Type | Method and Description |
---|---|
default InputStream |
apply(String url) |
static SchemaClient |
classPathAwareClient() |
InputStream |
get(String url)
Returns a stream to be used for reading the remote content (response body) of the URL.
|
static SchemaClient classPathAwareClient()
default InputStream apply(String url)
apply
in interface Function<String,InputStream>
InputStream get(String url)
url
- the URL of the remote resourceUncheckedIOException
- if an IO error occurs.Copyright © 2019 Everit Kft.. All rights reserved.