@ComponentProfile(summary="Basic Single Threaded Workflow", tag="workflow,base") public class StandardWorkflow extends StandardWorkflowImpl
Standard implementation of Workflow
. Links specific destinations in a Channel
. Consumes
AdaptrisMessage
s from a single ConsumeDestination
, processes these messages using a
ServiceCollection
, then produces the processed message using a AdaptrisMessageProducer
. In the event of
an Exception
processing a message, passes the problem message to a configured AdaptrisMessageListener
.
In the adapter configuration file this class is aliased as standard-workflow which is the preferred alternative to the fully qualified classname when building your configuration.
eventHandler, log, startTime, stopTime
PREVIOUS_GUID_KEY, WORKFLOW_ID_KEY
Constructor and Description |
---|
StandardWorkflow() |
StandardWorkflow(AdaptrisMessageConsumer consumer,
AdaptrisMessageProducer producer) |
StandardWorkflow(AdaptrisMessageConsumer consumer,
ServiceCollection services,
AdaptrisMessageProducer producer) |
Modifier and Type | Method and Description |
---|---|
protected void |
handleMessage(AdaptrisMessage msg,
boolean clone) |
void |
onAdaptrisMessage(AdaptrisMessage msg)
It is the responsibility of implementations of this interface to ensure
that all
Exception s, including RuntimeException s,
are handled. |
protected void |
resubmitMessage(AdaptrisMessage msg)
Resubmit a message upon the channel becoming available again.
|
closeWorkflow, initialiseWorkflow, prepareWorkflow, startWorkflow, stopWorkflow
addConsumeLocation, addInterceptor, changeState, channelUnavailableWait, close, copyExceptionHeaders, disableMessageCount, doProduce, friendlyName, getChannelUnavailableWaitInterval, getComments, getConsumer, getDisableDefaultMessageCount, getInterceptors, getLogPayload, getMessageErrorHandler, getMessageLogger, getProduceExceptionHandler, getProducer, getSendEvents, getServiceCollection, getUniqueId, handleBadMessage, handleBadMessage, handleChannelUnavailable, handleProduceException, init, lastStartTime, lastStopTime, logSuccess, messageLogger, obtainChannel, obtainWorkflowId, prepare, processingStart, registerActiveMsgErrorHandler, registerChannel, registerEventHandler, requestClose, requestInit, requestStart, requestStop, retrieveActiveMsgErrorHandler, retrieveComponentState, sendMessageLifecycleEvent, setChannelUnavailableWaitInterval, setComments, setConsumer, setDisableDefaultMessageCount, setInterceptors, setLogPayload, setMessageErrorHandler, setMessageLogger, setProduceExceptionHandler, setProducer, setSendEvents, setServiceCollection, setUniqueId, start, stop, workflowEnd, workflowStart
public StandardWorkflow()
public StandardWorkflow(AdaptrisMessageConsumer consumer, AdaptrisMessageProducer producer)
public StandardWorkflow(AdaptrisMessageConsumer consumer, ServiceCollection services, AdaptrisMessageProducer producer)
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.
msg
- the AdaptrisMessage
to processprotected void resubmitMessage(AdaptrisMessage msg)
WorkflowImp
resubmitMessage
in class WorkflowImp
msg
- the AdaptrisMessage.WorkflowImp.resubmitMessage(com.adaptris.core.AdaptrisMessage)
protected void handleMessage(AdaptrisMessage msg, boolean clone)