org.jclouds.cloudstack.handlers
Class RetryOnRenewAndLogoutOnClose

java.lang.Object
  extended by org.jclouds.cloudstack.handlers.RetryOnRenewAndLogoutOnClose
All Implemented Interfaces:
org.jclouds.http.HttpRetryHandler

public class RetryOnRenewAndLogoutOnClose
extends Object
implements org.jclouds.http.HttpRetryHandler

This will parse and set an appropriate exception on the command object.

Author:
Adrian Cole

Field Summary
protected  org.jclouds.logging.Logger logger
           
 
Fields inherited from interface org.jclouds.http.HttpRetryHandler
ALWAYS_RETRY, NEVER_RETRY
 
Constructor Summary
protected RetryOnRenewAndLogoutOnClose(com.google.common.cache.LoadingCache<org.jclouds.domain.Credentials,LoginResponse> authenticationResponseCache, SessionClient sessionClient)
           
 
Method Summary
 void logoutOnClose()
          it is important that we close any sessions on close to help the server not become overloaded.
 boolean shouldRetryRequest(org.jclouds.http.HttpCommand command, org.jclouds.http.HttpResponse response)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected org.jclouds.logging.Logger logger
Constructor Detail

RetryOnRenewAndLogoutOnClose

@Inject
protected RetryOnRenewAndLogoutOnClose(com.google.common.cache.LoadingCache<org.jclouds.domain.Credentials,LoginResponse> authenticationResponseCache,
                                              SessionClient sessionClient)
Method Detail

shouldRetryRequest

public boolean shouldRetryRequest(org.jclouds.http.HttpCommand command,
                                  org.jclouds.http.HttpResponse response)
Specified by:
shouldRetryRequest in interface org.jclouds.http.HttpRetryHandler

logoutOnClose

@PreDestroy
public void logoutOnClose()
it is important that we close any sessions on close to help the server not become overloaded.



Copyright © 2009-2012 jclouds. All Rights Reserved.