Class HttpClientRequestExecutor

  • All Implemented Interfaces:
    com.okta.commons.http.RequestExecutor

    public class HttpClientRequestExecutor
    extends java.lang.Object
    implements com.okta.commons.http.RequestExecutor
    RequestExecutor implementation that uses the Apache HttpClient implementation to execute http requests.
    Since:
    0.5.0
    • Constructor Summary

      Constructors 
      Constructor Description
      HttpClientRequestExecutor​(com.okta.commons.http.config.HttpClientConfiguration clientConfiguration)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.okta.commons.http.Response executeRequest​(com.okta.commons.http.Request request)  
      void setHttpClient​(org.apache.http.client.HttpClient httpClient)  
      protected byte[] toBytes​(org.apache.http.HttpEntity entity)  
      protected com.okta.commons.http.Response toSdkResponse​(org.apache.http.HttpResponse httpResponse)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • HttpClientRequestExecutor

        public HttpClientRequestExecutor​(com.okta.commons.http.config.HttpClientConfiguration clientConfiguration)
    • Method Detail

      • setHttpClient

        public void setHttpClient​(org.apache.http.client.HttpClient httpClient)
      • executeRequest

        public com.okta.commons.http.Response executeRequest​(com.okta.commons.http.Request request)
                                                      throws com.okta.commons.http.HttpException
        Specified by:
        executeRequest in interface com.okta.commons.http.RequestExecutor
        Throws:
        com.okta.commons.http.HttpException
      • toBytes

        protected byte[] toBytes​(org.apache.http.HttpEntity entity)
                          throws java.io.IOException
        Throws:
        java.io.IOException
      • toSdkResponse

        protected com.okta.commons.http.Response toSdkResponse​(org.apache.http.HttpResponse httpResponse)
                                                        throws java.io.IOException
        Throws:
        java.io.IOException