@ComponentProfile(summary="The default NO-OP failed message retrier implementation", tag="error-handling,base") public class NoRetries extends java.lang.Object implements FailedMessageRetrier
In the adapter configuration file this class is aliased as no-retries which is the preferred alternative to the fully qualified classname when building your configuration.
Constructor and Description |
---|
NoRetries() |
Modifier and Type | Method and Description |
---|---|
void |
addWorkflow(Workflow workflow)
Add a Workflow to the internal register of workflows
|
void |
clearWorkflows()
Clear the internal store of workflows.
|
void |
close()
Closes the component.
|
java.lang.String |
friendlyName()
Get the friendly name for this component.
|
java.lang.String |
getUniqueId()
Get the unique-id that is associated with this component.
|
void |
init()
Initialises the component.
|
void |
onAdaptrisMessage(AdaptrisMessage msg)
It is the responsibility of implementations of this interface to ensure
that all
Exception s, including RuntimeException s,
are handled. |
void |
prepare()
Prepare for initialisation.
|
java.util.Collection<java.lang.String> |
registeredWorkflowIds()
Return the list of workflow-ids registered.
|
void |
setUniqueId(java.lang.String uniqueId) |
void |
start()
Starts the component.
|
void |
stop()
Stop the component
|
public void addWorkflow(Workflow workflow)
FailedMessageRetrier
Add a Workflow to the internal store. If the generated key is not unique aCoreException is thrown.
addWorkflow
in interface FailedMessageRetrier
workflow
- the workflow to addpublic void close()
ComponentLifecycle
A closed component should release any connections it uses, etc. and clean up completely.
Throwing a RuntimeException
may cause unintended consequences
close
in interface ComponentLifecycle
public void init() throws CoreException
ComponentLifecycle
Component initialisation includes config verification, creation of connections etc.
init
in interface ComponentLifecycle
CoreException
- wrapping any underlying Exception
spublic void start() throws CoreException
ComponentLifecycle
Once a component is started it should be ready to process messages. In the case of
AdaptrisMessageConsumer
, calling start will begin message delivery.
start
in interface ComponentLifecycle
CoreException
- wrapping any underlying Exception
spublic void stop()
ComponentLifecycle
A stopped component is not expected to be ready to process messages. In the case of
AdaptrisMessageConsumer
, calling stop will pause message delivery. Throwing a
RuntimeException
may cause unintended consequences
stop
in interface ComponentLifecycle
public void onAdaptrisMessage(AdaptrisMessage msg)
AdaptrisMessageListener
It is the responsibility of implementations of this interface to ensure
that all Exception
s, including RuntimeException
s,
are handled. Failure to handle any Exception
will result in
undefined behaviour. Throwing a RuntimeException
to this
method is considered a bug.
Although most clients of implementations of this interface are likely to
be single-threaded, if implementations are not guaranteed to be thread
safe, they should be synchronized
or use some other locking
mechanism.
onAdaptrisMessage
in interface AdaptrisMessageListener
msg
- the AdaptrisMessage
to processpublic void clearWorkflows()
FailedMessageRetrier
clearWorkflows
in interface FailedMessageRetrier
public java.util.Collection<java.lang.String> registeredWorkflowIds()
FailedMessageRetrier
registeredWorkflowIds
in interface FailedMessageRetrier
public void prepare() throws CoreException
ComponentLifecycleExtension
prepare
in interface ComponentLifecycleExtension
CoreException
public java.lang.String getUniqueId()
AdaptrisComponent
getUniqueId
in interface AdaptrisComponent
public void setUniqueId(java.lang.String uniqueId)
public java.lang.String friendlyName()
AdaptrisMessageListener
friendlyName
in interface AdaptrisMessageListener