Changes since
the last release

com.ebay.sdk
Class CallRetry

java.lang.Object
  extended by com.ebay.sdk.CallRetry

public class CallRetry
extends Object

Defines failure-retry condition for API call.
1) If no exceptions are registered, all call exceptions will be retried.
2) If the current exception is registered in the CallRetry object, the call will be retried.
3) If the current exception is an ApiException (XML API) or SdkSoapException (SOAP API) and the returned API error code is registered in the TriggerApiErrorCodes property, the call will be retried.
4) If the current exception is an SdkHTTPException and the returned HTTP response code is registered in the TriggerHTTPErrorCodes property, the call will be retried.

Title:

Description:

Copyright: Copyright (c) 2004

Company: eBay Inc.

Version:
1.0
Author:
Weijun Li

Constructor Summary
CallRetry()
          Constructor.
 
Method Summary
 int getDelayTime()
          Get delay time for between each retry-API-call.
 int getMaximumRetries()
          Get maximum number of retries if the failure continues to happen.
 String[] getTriggerApiErrorCodes()
          Get list of API error codes upon which the retry should be triggered.
 Class[] getTriggerExceptions()
          Get the list of exception names upon any of them the call-retry will be triggered.
 int[] getTriggerHTTPErrorCodes()
           
 void setDelayTime(int delayTime)
          Set delay time between each retry-API-call.
 void setMaximumRetries(int maximumRetries)
          Set maximum number of retries if the failure continues to happen.
 void setTriggerApiErrorCodes(String[] triggerApiErrorCodes)
          If the trigger exception list (setTriggerExceptions()) contains ebay.sdk.ApiException, sets the list of API error codes upong which the retry should be triggered.
 void setTriggerExceptions(Class[] triggerExceptions)
          Set the list of exception names upon any of them the call-retry will be triggered.
 void setTriggerHTTPErrorCodes(int[] triggerHTTPErrorCodes)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CallRetry

public CallRetry()
Constructor.

Method Detail

getTriggerExceptions

public Class[] getTriggerExceptions()
Get the list of exception names upon any of them the call-retry will be triggered.

Returns:
List of exception names.

setTriggerExceptions

public void setTriggerExceptions(Class[] triggerExceptions)
Set the list of exception names upon any of them the call-retry will be triggered. e.g., "ebay.sdk.ApiException", "java.rmi.RemoteException",

null means the call-retry will be triggered for any exception.

Parameters:
triggerExceptions - String[]

getTriggerApiErrorCodes

public String[] getTriggerApiErrorCodes()
Get list of API error codes upon which the retry should be triggered.

Returns:
The API error code list.

setTriggerApiErrorCodes

public void setTriggerApiErrorCodes(String[] triggerApiErrorCodes)
If the trigger exception list (setTriggerExceptions()) contains ebay.sdk.ApiException, sets the list of API error codes upong which the retry should be triggered.

null means the retry will be triggered for any API error.

Parameters:
triggerApiErrorCodes - The API error code list.

getTriggerHTTPErrorCodes

public int[] getTriggerHTTPErrorCodes()

setTriggerHTTPErrorCodes

public void setTriggerHTTPErrorCodes(int[] triggerHTTPErrorCodes)

getMaximumRetries

public int getMaximumRetries()
Get maximum number of retries if the failure continues to happen.

Returns:
The maximum number of retries.

setMaximumRetries

public void setMaximumRetries(int maximumRetries)
Set maximum number of retries if the failure continues to happen.

Parameters:
maximumRetries - The maximum number of retries to be set to.

getDelayTime

public int getDelayTime()
Get delay time for between each retry-API-call.

Returns:
The delay time in milliseconds.

setDelayTime

public void setDelayTime(int delayTime)
Set delay time between each retry-API-call.

Parameters:
delayTime - The delay time to be set to. In milliseconds.

Changes since
the last release

The information contained in this document is proprietary and confidential. Use of this information and the eBay API requires a Non-Disclosure Agreement (NDA) between the user and eBay Inc. For information regarding a qualifying NDA, contact Developer Relations: developer-relations@ebay.com
© 2004-2009 eBay Inc. All rights reserved.