org.jclouds.http
Class HttpCommand

java.lang.Object
  extended by org.jclouds.http.HttpCommand

public class HttpCommand
extends Object

Command whose endpoint is an http service.

Author:
Adrian Cole

Constructor Summary
HttpCommand(HttpRequest request)
           
 
Method Summary
 boolean equals(Object that)
           
 HttpRequest getCurrentRequest()
          The request associated with this command.
 Exception getException()
           
 int getFailureCount()
          This displays the current number of error retries for this command.
 int getRedirectCount()
          This displays the current number of redirect attempts for this command.
 int hashCode()
           
 int incrementFailureCount()
          increment the current failure count.
 int incrementRedirectCount()
          increments the current number of redirect attempts for this command.
 boolean isReplayable()
          Commands need to be replayed, if redirected or on a retryable error.
 void setCurrentRequest(HttpRequest request)
          The request associated with this command.
 void setException(Exception exception)
          Used to prevent a command from being re-executed, or having its response parsed.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HttpCommand

public HttpCommand(HttpRequest request)
Method Detail

getFailureCount

public int getFailureCount()
This displays the current number of error retries for this command.

See Also:
org.jclouds.Constants.PROPERTY_MAX_RETRIES

incrementFailureCount

public int incrementFailureCount()
increment the current failure count.

See Also:
getFailureCount()

setException

public void setException(Exception exception)
Used to prevent a command from being re-executed, or having its response parsed.


getException

public Exception getException()
See Also:
setException(java.lang.Exception)

incrementRedirectCount

public int incrementRedirectCount()
increments the current number of redirect attempts for this command.

See Also:
getRedirectCount()

getRedirectCount

public int getRedirectCount()
This displays the current number of redirect attempts for this command.

See Also:
org.jclouds.Constants.PROPERTY_MAX_REDIRECTS

isReplayable

public boolean isReplayable()
Commands need to be replayed, if redirected or on a retryable error. Typically, this implies the payload carried is not a streaming type.


getCurrentRequest

public HttpRequest getCurrentRequest()
The request associated with this command.


setCurrentRequest

public void setCurrentRequest(HttpRequest request)
The request associated with this command.


hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object that)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2009-2013 jclouds. All Rights Reserved.