Class HttpCommand<R>
- java.lang.Object
-
- org.openstack4j.connectors.httpclient.HttpCommand<R>
-
public final class HttpCommand<R> extends Object
HttpCommand is responsible for executing the actual request driven by the HttpExecutor.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <R> HttpCommand<R>create(HttpRequest<R> request)Creates a new HttpCommand from the given requestorg.apache.http.client.methods.CloseableHttpResponseexecute()Executes the command and returns the ResponseHttpRequest<R>getRequest()intgetRetries()booleanhasEntity()HttpCommand<R>incrementRetriesAndReturn()
-
-
-
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 ExceptionExecutes 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
-
getRequest
public HttpRequest<R> getRequest()
-
-