Class ManualClosingApacheHttpClient43Engine

    • Constructor Detail

      • ManualClosingApacheHttpClient43Engine

        public ManualClosingApacheHttpClient43Engine()
      • ManualClosingApacheHttpClient43Engine

        public ManualClosingApacheHttpClient43Engine​(org.apache.http.HttpHost defaultProxy)
      • ManualClosingApacheHttpClient43Engine

        public ManualClosingApacheHttpClient43Engine​(org.apache.http.client.HttpClient httpClient)
      • ManualClosingApacheHttpClient43Engine

        public ManualClosingApacheHttpClient43Engine​(org.apache.http.client.HttpClient httpClient,
                                                     boolean closeHttpClient)
      • ManualClosingApacheHttpClient43Engine

        public ManualClosingApacheHttpClient43Engine​(org.apache.http.client.HttpClient httpClient,
                                                     HttpContextProvider httpContextProvider)
    • Method Detail

      • getResponseBufferSize

        public int getResponseBufferSize()
        Response stream is wrapped in a BufferedInputStream. Default is 8192. Value of 0 will not wrap it. Value of -1 will use a SelfExpandingBufferedInputStream
        Returns:
        response buffer size
      • setResponseBufferSize

        public void setResponseBufferSize​(int responseBufferSize)
        Response stream is wrapped in a BufferedInputStream. Default is 8192. Value of 0 will not wrap it. Value of -1 will use a SelfExpandingBufferedInputStream
        Parameters:
        responseBufferSize - response buffer size
      • getFileUploadMemoryThreshold

        public Threshold getFileUploadMemoryThreshold()
        Returns the memory threshold of the amount of data to hold in memory.
        Returns:
        the memory threshold
      • setFileUploadMemoryThreshold

        public void setFileUploadMemoryThreshold​(Threshold threshold)
        Sets the memory threshold for the amount of content to hold in memory before it offloads to offline storage.
        Parameters:
        threshold - the in memory threshold
      • getFileUploadTempFileDir

        public File getFileUploadTempFileDir()
      • setFileUploadTempFileDir

        public void setFileUploadTempFileDir​(File fileUploadTempFileDir)
      • getHttpClient

        public org.apache.http.client.HttpClient getHttpClient()
      • setSslContext

        public void setSslContext​(SSLContext sslContext)
      • setHostnameVerifier

        public void setHostnameVerifier​(HostnameVerifier hostnameVerifier)
      • invoke

        public jakarta.ws.rs.core.Response invoke​(jakarta.ws.rs.client.Invocation inv)
        Specified by:
        invoke in interface ClientHttpEngine
      • createHttpMethod

        protected org.apache.http.client.methods.HttpRequestBase createHttpMethod​(String url,
                                                                                  String restVerb)
      • loadHttpMethod

        protected void loadHttpMethod​(ClientInvocation request,
                                      org.apache.http.client.methods.HttpRequestBase httpMethod)
                               throws Exception
        Throws:
        Exception
      • commitHeaders

        protected void commitHeaders​(ClientInvocation request,
                                     org.apache.http.client.methods.HttpRequestBase httpMethod)
      • isChunked

        public boolean isChunked()
      • setChunked

        public void setChunked​(boolean chunked)
      • cleanUpAfterExecute

        protected void cleanUpAfterExecute​(org.apache.http.client.methods.HttpRequestBase httpMethod)
        If passed httpMethod is of type HttpPost then obtain its entity. If the entity has an enclosing File then delete it by invoking this method after the request has completed. The entity will have an enclosing File only if it was too huge to fit into memory.
        Parameters:
        httpMethod - - the httpMethod to clean up.
      • buildEntity

        protected org.apache.http.HttpEntity buildEntity​(ClientInvocation request)
                                                  throws IOException
        Build the HttpEntity to be sent to the Service as part of (POST) request. Creates a off-memory FileEntity or a regular in-memory ByteArrayEntity depending on if the request OutputStream fit into memory when built by calling.
        Parameters:
        request - -
        Returns:
        - the built HttpEntity
        Throws:
        IOException - -
      • getTempfilePrefix

        protected String getTempfilePrefix()
        Use context information, which will include node name, to avoid conflicts in case of multiple VMS using same temp directory location.
        Returns:
        -
      • createDefaultHttpClient

        protected org.apache.http.client.HttpClient createDefaultHttpClient()
      • getDefaultProxy

        public org.apache.http.HttpHost getDefaultProxy()
      • setRedirectRequired

        protected void setRedirectRequired​(ClientInvocation request,
                                           org.apache.http.client.methods.HttpRequestBase httpMethod)
      • setRedirectNotRequired

        protected void setRedirectNotRequired​(ClientInvocation request,
                                              org.apache.http.client.methods.HttpRequestBase httpMethod)
      • isClosed

        public boolean isClosed()