Package com.adaptris.core
Class FailedMessageRetrierImp
- java.lang.Object
-
- com.adaptris.core.FailedMessageRetrierImp
-
- All Implemented Interfaces:
AdaptrisComponent
,ComponentLifecycle
,ComponentLifecycleExtension
,FailedMessageRetrier
- Direct Known Subclasses:
DefaultFailedMessageRetrier
,RetryFromJetty
public abstract class FailedMessageRetrierImp extends java.lang.Object implements FailedMessageRetrier
Component which consumes
AdaptrisMessage
s and, based on message metadata, resubmits them to theWorkflow
which processed them originally.
-
-
Field Summary
Fields Modifier and Type Field Description protected org.slf4j.Logger
log
-
Constructor Summary
Constructors Constructor Description FailedMessageRetrierImp()
Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addWorkflow(Workflow workflow)
Add a Workflow to the internal register of workflowsvoid
clearWorkflows()
Clear the internal store of workflows.java.lang.String
getUniqueId()
Get the unique-id that is associated with this component.protected Workflow
getWorkflow(AdaptrisMessage msg)
protected Workflow
getWorkflow(java.lang.String workflowId)
protected java.util.Map<java.lang.String,Workflow>
getWorkflows()
java.util.Collection<java.lang.String>
registeredWorkflowIds()
Return the list of workflow-ids registered.void
setUniqueId(java.lang.String uniqueId)
protected void
updateRetryCountMetadata(AdaptrisMessage msg)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.adaptris.core.ComponentLifecycle
close, init, start, stop
-
Methods inherited from interface com.adaptris.core.ComponentLifecycleExtension
prepare
-
-
-
-
Method Detail
-
getWorkflow
protected Workflow getWorkflow(AdaptrisMessage msg) throws CoreException
- Throws:
CoreException
-
getWorkflow
protected Workflow getWorkflow(java.lang.String workflowId) throws CoreException
- Throws:
CoreException
-
updateRetryCountMetadata
protected void updateRetryCountMetadata(AdaptrisMessage msg)
-
addWorkflow
public void addWorkflow(Workflow workflow) throws CoreException
Description copied from interface:FailedMessageRetrier
Add a Workflow to the internal register of workflowsAdd a Workflow to the internal store. If the generated key is not unique aCoreException is thrown.
- Specified by:
addWorkflow
in interfaceFailedMessageRetrier
- Parameters:
workflow
- the workflow to add- Throws:
CoreException
- if it is considered a duplicate
-
clearWorkflows
public void clearWorkflows()
Description copied from interface:FailedMessageRetrier
Clear the internal store of workflows.- Specified by:
clearWorkflows
in interfaceFailedMessageRetrier
-
registeredWorkflowIds
public java.util.Collection<java.lang.String> registeredWorkflowIds()
Description copied from interface:FailedMessageRetrier
Return the list of workflow-ids registered.- Specified by:
registeredWorkflowIds
in interfaceFailedMessageRetrier
- Returns:
- collection containing a list of all the workflow unique-ids.
-
getWorkflows
protected java.util.Map<java.lang.String,Workflow> getWorkflows()
-
getUniqueId
public java.lang.String getUniqueId()
Description copied from interface:AdaptrisComponent
Get the unique-id that is associated with this component.- Specified by:
getUniqueId
in interfaceAdaptrisComponent
- Returns:
- the unique-id
-
setUniqueId
public void setUniqueId(java.lang.String uniqueId)
-
-