org.jclouds.gogrid.mock
Class HttpCommandMock

java.lang.Object
  extended by org.jclouds.gogrid.mock.HttpCommandMock
All Implemented Interfaces:
HttpCommand

public class HttpCommandMock
extends Object
implements HttpCommand

Author:
Oleksiy Yarmula

Constructor Summary
HttpCommandMock()
           
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpCommandMock

public HttpCommandMock()
Method Detail

incrementRedirectCount

public int incrementRedirectCount()
Description copied from interface: HttpCommand
increments the current number of redirect attempts for this command.

Specified by:
incrementRedirectCount in interface HttpCommand
See Also:
HttpCommand.getRedirectCount()

getRedirectCount

public int getRedirectCount()
Description copied from interface: HttpCommand
This displays the current number of redirect attempts for this command.

Specified by:
getRedirectCount in interface HttpCommand
See Also:
org.jclouds.Constants.PROPERTY_MAX_REDIRECTS

isReplayable

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

Specified by:
isReplayable in interface HttpCommand

incrementFailureCount

public int incrementFailureCount()
Description copied from interface: HttpCommand
increment the current failure count.

Specified by:
incrementFailureCount in interface HttpCommand
See Also:
HttpCommand.getFailureCount()

getFailureCount

public int getFailureCount()
Description copied from interface: HttpCommand
This displays the current number of error retries for this command.

Specified by:
getFailureCount in interface HttpCommand
See Also:
org.jclouds.Constants.PROPERTY_MAX_RETRIES

getCurrentRequest

public HttpRequest getCurrentRequest()
Description copied from interface: HttpCommand
The request associated with this command.

Specified by:
getCurrentRequest in interface HttpCommand

setException

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

Specified by:
setException in interface HttpCommand

getException

public Exception getException()
Specified by:
getException in interface HttpCommand
See Also:
HttpCommand.setException(java.lang.Exception)

setCurrentRequest

public void setCurrentRequest(HttpRequest request)
Description copied from interface: HttpCommand
The request associated with this command.

Specified by:
setCurrentRequest in interface HttpCommand


Copyright © 2009-2011 jclouds. All Rights Reserved.