org.jclouds.http
Interface HttpCommand

All Known Subinterfaces:
TransformingHttpCommand<T>
All Known Implementing Classes:
HttpCommandMock, TransformingHttpCommandImpl

public interface HttpCommand

Command whose endpoint is an http service.

Author:
Adrian Cole

Method Summary
 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 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.
 

Method Detail

incrementRedirectCount

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

See Also:
getRedirectCount()

getRedirectCount

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

See Also:
org.jclouds.Constants.PROPERTY_MAX_REDIRECTS

isReplayable

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.


incrementFailureCount

int incrementFailureCount()
increment the current failure count.

See Also:
getFailureCount()

getFailureCount

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

See Also:
org.jclouds.Constants.PROPERTY_MAX_RETRIES

getCurrentRequest

HttpRequest getCurrentRequest()
The request associated with this command.


setCurrentRequest

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


setException

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


getException

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


Copyright © 2009-2011 jclouds. All Rights Reserved.