Class IndexingClient

    • Constructor Detail

      • IndexingClient

        public IndexingClient​(org.apache.http.impl.client.CloseableHttpClient http,
                              SlingClientConfig config)
                       throws ClientException
        Constructor used by Builders and adaptTo(). Should never be called directly from the code.
        Parameters:
        http - the underlying HttpClient to be used
        config - sling specific configs
        Throws:
        ClientException - if the client could not be created
      • IndexingClient

        public IndexingClient​(URI url,
                              String user,
                              String password)
                       throws ClientException

        Handy constructor easy to use in simple tests. Creates a client that uses basic authentication.

        For constructing clients with complex configurations, use a SlingClient.InternalBuilder

        For constructing clients with the same configuration, but a different class, use AbstractSlingClient.adaptTo(Class)

        Parameters:
        url - url of the server (including context path)
        user - username for basic authentication
        password - password for basic authentication
        Throws:
        ClientException - never, kept for uniformity with the other constructors