Class HttpCommand<R>


  • public final class HttpCommand<R>
    extends Object
    HttpCommand is responsible for executing the actual request driven by the HttpExecutor.
    • Method Detail

      • create

        public static <R> HttpCommand<R> create​(HttpRequest<R> request)
        Creates a new HttpCommand from the given request
        Parameters:
        request - the request
        Returns:
        the command
      • execute

        public org.apache.http.client.methods.CloseableHttpResponse execute()
                                                                     throws Exception
        Executes the command and returns the Response
        Returns:
        the response
        Throws:
        Exception
      • hasEntity

        public boolean hasEntity()
        Returns:
        true if a request entity has been set
      • getRetries

        public int getRetries()
        Returns:
        current retry execution count for this command
      • incrementRetriesAndReturn

        public HttpCommand<R> incrementRetriesAndReturn()
        Returns:
        incremement's the retry count and returns self