Changes since
the last release

com.ebay.sdk
Class ExceptionFilter

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

public class ExceptionFilter
extends java.lang.Object

Implements exception matching for call retry and for exception payload logging.
1) If no exceptions are registered, all call exceptions match.
2) If the current exception is registered by type name, it matches.
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, it matches.
4) If the current exception is an SdkHTTPException and the returned HTTP response code is registered in the TriggerHTTPErrorCodes property, it matches.


Title:

Description:

Copyright: Copyright (c) 2004

Company: eBay Inc.

Version:
1.0
Author:
Ron Murphy

Constructor Summary
ExceptionFilter()
          Constructor.
ExceptionFilter(java.lang.String errorCodes, java.lang.String exceptions, java.lang.String httpStatusCodes)
           
 
Method Summary
 java.lang.String[] getTriggerApiErrorCodes()
          Get list of API error codes to match against.
 java.lang.Class[] getTriggerExceptions()
          Get the list of exception names upon any of them the call-retry will be triggered.
 int[] getTriggerHTTPErrorCodes()
          Get list of HTTP status codes to match against.
 boolean matches(java.lang.Exception exception)
          Determines if the exception matches the filter.
 void setTriggerApiErrorCodes(java.lang.String[] triggerApiErrorCodes)
          For the case where the error is an ApiException / SdkSoapException, sets the list of API error codes to match against.
 void setTriggerExceptions(java.lang.Class[] triggerExceptions)
          Set the list of exception names to match against.
 void setTriggerHTTPErrorCodes(int[] triggerHTTPErrorCodes)
          For the case where the error is an SdkHttpException, sets the list of HTTP status codes to match against.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExceptionFilter

public ExceptionFilter()
Constructor.


ExceptionFilter

public ExceptionFilter(java.lang.String errorCodes,
                       java.lang.String exceptions,
                       java.lang.String httpStatusCodes)
Method Detail

getTriggerExceptions

public java.lang.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(java.lang.Class[] triggerExceptions)
Set the list of exception names to match against. e.g., "ebay.sdk.ApiException", "java.rmi.RemoteException",

Parameters:
triggerExceptions - String[]

getTriggerApiErrorCodes

public java.lang.String[] getTriggerApiErrorCodes()
Get list of API error codes to match against.

Returns:
The API error code list.

setTriggerApiErrorCodes

public void setTriggerApiErrorCodes(java.lang.String[] triggerApiErrorCodes)
For the case where the error is an ApiException / SdkSoapException, sets the list of API error codes to match against.

Parameters:
triggerApiErrorCodes - The API error code list.

getTriggerHTTPErrorCodes

public int[] getTriggerHTTPErrorCodes()
Get list of HTTP status codes to match against.

Returns:
The HTTP status code list.

setTriggerHTTPErrorCodes

public void setTriggerHTTPErrorCodes(int[] triggerHTTPErrorCodes)
For the case where the error is an SdkHttpException, sets the list of HTTP status codes to match against.

Parameters:
triggerHTTPErrorCodes - The HTTP status code list.

matches

public boolean matches(java.lang.Exception exception)
Determines if the exception matches the filter.

Parameters:
exception - The Exception to be matched.
Returns:
true indicates the exception matches the filter.

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.