public abstract class RecoveryHandler
extends java.lang.Object
RecoveryHandler
interface defines how the exception will be handled
by Recovery.
Any sub-system leveraging Recovery needs can call the interface to hand over the
exception to Recovery handler, which will generate a failed event. The original event
data (message, record) is still in the sub-system.
Usage:
RecoveryHandler.getInstance().handleException(eventId, exception, context);Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COMPONENT_NAME_PROPERTY
SCA Component name where the exception happened.
|
static java.lang.String |
COMPONENT_TYPE_JMS
Component types for components.
|
static java.lang.String |
COMPONENT_TYPE_MQ |
static java.lang.String |
COMPONENT_TYPE_PROPERTY
Type of binding that received the message.
|
static java.lang.String |
COPYRIGHT |
static java.lang.String |
EXPIRATION_PROPERTY
Expiration time of the failed event
The property is mandatory.
|
static java.lang.String |
FAILURE_TIME_PROPERTY
The timestamp when the exception happened.
|
static java.lang.String |
INTERACTION_TYPE_PROPERTY
SCA interaction type
Property value type: String
|
static java.lang.String |
MODULE_NAME_PROPERTY
SCA Module name where the exception happened.
|
static java.lang.String |
OPERATION_NAME_PROPERTY
Operation name (of the SCA interface) where the exception happened
The property is mandatory.
|
static java.lang.String |
RESUBMIT_DESTINATION_PROPERTY
Resubmit destination of the failed event
The property is mandatory.
|
Constructor and Description |
---|
RecoveryHandler() |
Modifier and Type | Method and Description |
---|---|
static RecoveryHandler |
getInstance()
Gets an instance of RecoveryHandler.
|
abstract void |
handleException(java.lang.String eventId,
java.lang.Exception exception,
java.util.Properties context)
Hand over the exception from sub-system to Recovery handler.
|
public static final java.lang.String COPYRIGHT
public static final java.lang.String COMPONENT_TYPE_JMS
public static final java.lang.String COMPONENT_TYPE_MQ
public static final java.lang.String MODULE_NAME_PROPERTY
public static final java.lang.String COMPONENT_TYPE_PROPERTY
public static final java.lang.String COMPONENT_NAME_PROPERTY
public static final java.lang.String OPERATION_NAME_PROPERTY
public static final java.lang.String RESUBMIT_DESTINATION_PROPERTY
public static final java.lang.String EXPIRATION_PROPERTY
public static final java.lang.String FAILURE_TIME_PROPERTY
public static final java.lang.String INTERACTION_TYPE_PROPERTY
public static RecoveryHandler getInstance() throws RecoveryException
RecoveryException
- if the base Recovery handler could not be loaded.public abstract void handleException(java.lang.String eventId, java.lang.Exception exception, java.util.Properties context) throws RecoveryException
eventId
- Event identifier to locate the event in sub-system
JMS system id for JMS messageexception
- The exception related to the exceptioncontext
- Properties containing context informationRecoveryException
- when the failed event can not be saved successfully.