Interface SchemaClient

  • All Superinterfaces:
    Function<String,​InputStream>
    All Known Implementing Classes:
    DefaultSchemaClient
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface SchemaClient
    extends Function<String,​InputStream>
    This interface is used by 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.

    • Method Detail

      • classPathAwareClient

        static SchemaClient classPathAwareClient()
      • get

        InputStream get​(String url)
        Returns a stream to be used for reading the remote content (response body) of the URL. In the case of a HTTP URL, implementations are expected send HTTP GET requests and the response is expected to be represented in UTF-8 character set.
        Parameters:
        url - the URL of the remote resource
        Returns:
        the input stream of the response
        Throws:
        UncheckedIOException - if an IO error occurs.