|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.retail.AEF.util.AEFErrorHandler
ErrorHandler is a class which the AEF applications can use to handle application errors.
Field Summary | |
---|---|
protected java.lang.Object |
additionalData
|
protected com.ibm.retail.si.util.AEFException |
allExceptions
|
protected java.lang.String |
applicationErrorText
|
protected java.util.ArrayList |
errorHistory
|
protected boolean |
ignoreMaxErrorLevels
|
protected static org.apache.commons.logging.Log |
log
|
protected int |
maxErrorLevels
|
protected int |
maxSameError
|
protected com.ibm.retail.AEF.util.AEFMessage |
msg
|
protected int |
numSameError
|
protected int |
sleepInterval
|
Constructor Summary | |
---|---|
AEFErrorHandler(int errorLevels,
java.lang.String errorText)
Constructor |
|
AEFErrorHandler(int errorLevels,
java.lang.String errorText,
java.lang.Object data)
Constructor |
|
AEFErrorHandler(java.lang.String errorText)
Constructor |
|
AEFErrorHandler(java.lang.String errorText,
java.lang.Object data)
Constructor |
Method Summary | |
---|---|
(package private) static java.lang.String |
copyright()
|
java.lang.Object |
getAdditionalData()
Gets the additional data pased by the calling application or a NULL. |
com.ibm.retail.si.util.AEFException |
getAllExceptions()
Returns the allExceptions variable which contains the exceptions encountered while trying to handle the error. |
java.lang.String |
getAllFormattedErrorText(boolean includeApplicationText)
Returns a string which is the formatted error information from all the error handled. |
int |
getErrorHandlingMode()
Gets the error handling mode from the Automation Provider. |
com.ibm.retail.si.util.AEFError[] |
getErrors()
Returns the array of all the errors handled so far. |
java.lang.String |
getFormattedErrorText(int index,
boolean includeApplicationText)
Returns a string which is the formatted error information for a specific error. |
int |
getSleepInterval()
Returns the number of milliseconds to wait before continuing with the next operation while handling errors. |
int |
handleError(com.ibm.retail.AEF.thread.ConditionLock lock,
com.ibm.retail.AEF.action.AEFAction keySequenceAction,
com.ibm.retail.AEF.automation.Condition[] goodConditions,
com.ibm.retail.AEF.automation.Condition[] badConditions,
int timeout,
int satisfiedCondition)
Returns the index of the condition that satisfied the wait. |
int |
handleSpecificError(com.ibm.retail.AEF.thread.ConditionLock lock,
com.ibm.retail.AEF.action.AEFAction keySequenceAction,
com.ibm.retail.AEF.automation.Condition[] goodConditions,
com.ibm.retail.AEF.automation.Condition[] badConditions,
int timeout,
int satisfiedCondition,
int errorLevel)
Returns the index of the condition that satisfied the wait. |
void |
sleep()
Causes the Error Helper to wait before continuing with the next operation. |
void |
sleep(int userInterval)
Causes the Error Helper to wait before continuing with the next operation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected int maxSameError
protected int numSameError
protected int maxErrorLevels
protected boolean ignoreMaxErrorLevels
protected java.lang.String applicationErrorText
protected com.ibm.retail.si.util.AEFException allExceptions
protected java.util.ArrayList errorHistory
protected int sleepInterval
protected java.lang.Object additionalData
protected static org.apache.commons.logging.Log log
protected com.ibm.retail.AEF.util.AEFMessage msg
Constructor Detail |
public AEFErrorHandler(int errorLevels, java.lang.String errorText)
errorLevels
- Determines the maximum number of errors that
the handler will try to clear. 0 means to continue to try
to correct the error forever.errorText
- Includes any additional text that the application wants
to include in the exception if any is thrown by the handler.public AEFErrorHandler(int errorLevels, java.lang.String errorText, java.lang.Object data)
errorLevels
- Determines the maximum number of errors that
the handler will try to clear. 0 means to continue to try
to correct the error forever.errorText
- Includes any additional text that the application wants
to include in the exception if any is thrown by the handler.data
- Includes any additional data that the Error Handler or Helpers may need.public AEFErrorHandler(java.lang.String errorText, java.lang.Object data)
errorText
- Includes any additional text that the application wants
to include in the exception if any is thrown by the handler.data
- Includes any additional data that the Error Handler or Helpers may need.public AEFErrorHandler(java.lang.String errorText)
errorText
- Includes any additional text that the application wants
to include in the exception if any is thrown by the handler.Method Detail |
static java.lang.String copyright()
public com.ibm.retail.si.util.AEFError[] getErrors()
public java.lang.String getAllFormattedErrorText(boolean includeApplicationText)
public java.lang.String getFormattedErrorText(int index, boolean includeApplicationText)
public int handleError(com.ibm.retail.AEF.thread.ConditionLock lock, com.ibm.retail.AEF.action.AEFAction keySequenceAction, com.ibm.retail.AEF.automation.Condition[] goodConditions, com.ibm.retail.AEF.automation.Condition[] badConditions, int timeout, int satisfiedCondition) throws AEFException
lock
- The ConditionLock that returned the error.keySequenceAction
- The key sequence that generated the error.goodConditions
- An array of the conditions that would indicate
success after the key sequence is sent.badConditions
- An array of the conditions that would indicate a
failure after the key sequence is sent. For the most part, these
should be states and not individual errors. The assumption is that
most errors would put the application in some sort of error state. The
handler would then figure out which error put the application in this
state and handle the error.timeout
- An integer used to determine how long to wait for one
of the listed conditions before a timeout exception is thrown.satisfiedCondition
- The index of the condition in the badConditions
array that was satisfied (needs to be adjusted as it is a negative number).
AEFException
- Because of the nature of this method, just about any error code could be returned.
public int handleSpecificError(com.ibm.retail.AEF.thread.ConditionLock lock, com.ibm.retail.AEF.action.AEFAction keySequenceAction, com.ibm.retail.AEF.automation.Condition[] goodConditions, com.ibm.retail.AEF.automation.Condition[] badConditions, int timeout, int satisfiedCondition, int errorLevel) throws AEFException
lock
- The ConditionLock that returned the error.keySequenceAction
- The key sequence that generated the error.goodConditions
- An array of the conditions that would indicate
success after the key sequence is sent.badConditions
- An array of the conditions that would indicate
a failure after the key sequence is sent.timeout
- An integer used to determine how long to wait for one
of the listed conditions before a timeout exception is thrown.satisfiedCondition
- The index of the condition in the badConditions
array that was satisfied (needs to be adjusted as it is a negative number).errorLevel
- The number of times that this function has been called.
AEFException
- Because of the nature of this method, just about any error code could be returned.
public com.ibm.retail.si.util.AEFException getAllExceptions()
public int getSleepInterval()
public void sleep()
public void sleep(int userInterval)
userInterval
- A user specified interval to be used instead of the default
sleep value.public int getErrorHandlingMode() throws AEFException
AEFException
- Among the possible AEFException error codes are:
public java.lang.Object getAdditionalData()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |