Class ServletClient

    • Constructor Detail

      • ServletClient

        public ServletClient​(ClientConfiguration clientConfiguration,
                             org.apache.http.impl.client.CloseableHttpClient httpClient)
    • Method Detail

      • addTriples

        public final void addTriples​(boolean complete,
                                     Uri graphUri,
                                     org.apache.jena.shared.PrefixMapping prefixMapping,
                                     Iterator<org.apache.jena.graph.Triple> triples)
        Description copied from interface: AddTriplesApiFunction
        Add all triples from the given graph
        Specified by:
        addTriples in interface AddTriplesApiFunction
        Parameters:
        complete - signal whether this is the last batch of triples or not
        graphUri - graph URI to add the triples to
        prefixMapping - namespace prefix mapping
        triples - iterator over triples
      • execute

        protected final org.apache.http.client.methods.CloseableHttpResponse execute​(org.apache.http.client.methods.HttpUriRequest httpUriRequest)
      • get

        protected final org.apache.http.client.methods.CloseableHttpResponse get​(org.apache.http.client.utils.URIBuilder uriBuilder)
      • getHttpClient

        protected final org.apache.http.impl.client.CloseableHttpClient getHttpClient()
      • newUriBuilder

        protected final org.apache.http.client.utils.URIBuilder newUriBuilder​(String relativeUriPath)
      • postForm

        protected final org.apache.http.client.methods.CloseableHttpResponse postForm​(List<org.apache.http.NameValuePair> nameValuePairs,
                                                                                      org.apache.http.client.utils.URIBuilder uriBuilder)
      • toString

        protected final String toString​(org.apache.http.HttpResponse httpResponse)
                                 throws IOException
        Convert an HttpResponse to a string, usually for logging.

        Consumes the entity (body) in order to convert it to a string.

        Throws:
        IOException
      • toString

        protected final String toString​(org.apache.http.HttpResponse httpResponse,
                                        String httpResponseEntity)
                                 throws IOException
        Convert an HttpResponse to a string, usually for logging.

        Uses an entity (body) that has been previously converted to a string.

        Throws:
        IOException