public abstract class AbstractSubscriptionScheduledActionCmdImpl extends TaskCommandImpl implements SubscriptionScheduledActionCmd
Modifier and Type | Class and Description |
---|---|
static class |
AbstractSubscriptionScheduledActionCmdImpl.StackEntry
This class represents an entry in the command's state processing stack.
|
Modifier and Type | Field and Description |
---|---|
static int |
MAX_RETRIES_FOR_SUBSCRIPTION_STATE_UPDATE
Constant representing the number of times a state update needs to be retried before failing.
|
NAME
Constructor and Description |
---|
AbstractSubscriptionScheduledActionCmdImpl() |
Modifier and Type | Method and Description |
---|---|
TypedProperty |
getActionParameters()
This method returns the action parameters for the scheduled action.
|
java.lang.Long |
getSubscriptionId()
This method returns the unique ID of the subscription being processed.
|
void |
initialize()
This method initializes the task command.By default this method does
nothing.
|
void |
performExecute()
This method executes the business logic required for carrying out the
scheduled action.
|
void |
setActionParameters(TypedProperty actionParameters)
Sets the action parameters for the scheduled action.
|
void |
setExeceptionForFailure(java.lang.Throwable cause)
This method sets the exception which caused the failure for this command.
|
void |
setScheduledAction(java.lang.Long scheduledActionID)
Sets the
Subscrschjobs object instance which represents the
scheduled action being executed. |
void |
setSubscriptionId(java.lang.Long subscriptionId)
Sets the subscription ID being processed.
|
accessControlCheck, checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getObjectSize, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, isReadyToCallExecute, reset, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties, validateParameters
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, setObjectSize, unionDependencies, updateCache
getCommandTarget, getCommandTargetName, getTargetPolicy, hasOutputProperties, setCommandTarget, setCommandTargetName, setHasOutputProperties, setOutputProperties, setTargetPolicy
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDelayBetweenRetries
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, updateCache
getCommandTarget, getCommandTargetName, hasOutputProperties, setCommandTarget, setCommandTargetName, setOutputProperties
checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties, validateParameters
public static final int MAX_RETRIES_FOR_SUBSCRIPTION_STATE_UPDATE
public AbstractSubscriptionScheduledActionCmdImpl()
public void initialize() throws java.lang.Exception
initialize
in interface SubscriptionScheduledActionCmd
java.lang.Exception
public void setActionParameters(TypedProperty actionParameters)
setActionParameters
in interface SubscriptionScheduledActionCmd
actionParameters
- The parameters for the scheduled action.public void setScheduledAction(java.lang.Long scheduledActionID)
Subscrschjobs
object instance which represents the
scheduled action being executed.setScheduledAction
in interface SubscriptionScheduledActionCmd
scheduledActionID
- The unique ID of the scheduled action being carried out by the command.public void setSubscriptionId(java.lang.Long subscriptionId)
setSubscriptionId
in interface SubscriptionScheduledActionCmd
subscriptionId
- The unique ID of the subscription being processed.public java.lang.Long getSubscriptionId()
public TypedProperty getActionParameters()
getActionParameters
in interface SubscriptionScheduledActionCmd
public final void performExecute() throws ECException
Any failures during processing would trigger the recovery mechanism after
retries. After the recovery mechanism is completed, the method throws a
SubscriptionSystemException with
_ERR_EXECUTION_OF_SCHEDULED_ACTION_FAILED
as the message
key.
Once the scheduled action is processed successfully through the transient
states, this method resets the transient state in the subscription table
and updates the subscription to the final state as returned by the
getFinalStateForSubscription
method. Any failure while
updating the subscription state after retries would result in a
SubscriptionSystemException with
_ERR_EXECUTION_OF_SCHEDULED_ACTION_FAILED_SUCCESSFULLY
.
performExecute
in interface ECCommand
performExecute
in interface com.ibm.websphere.command.TargetableCommand
performExecute
in class AbstractECTargetableCommand
ECException
- When an exception occurs.public void setExeceptionForFailure(java.lang.Throwable cause)
setExeceptionForFailure
in interface SubscriptionScheduledActionCmd
cause
- The exception which caused the failure.