Class ThreadContextWorkflow
- All Implemented Interfaces:
- AdaptrisComponent,- AdaptrisMessageListener,- ComponentLifecycle,- ComponentLifecycleExtension,- ConfigComment,- EventHandlerAware,- StateManagedComponent,- Workflow
 This is different to StandardWorkflow in the sense that it does not synchronize on the
 onAdaptrisMessage() method and processes the message in the same thread as the caller.
 This is useful if you have a consumer that may be triggered by multiple threads (e.g. Jetty or
 JMS) but you don't want to use PoolingWorkflow. It is probably of little or no benefit
 where the consumer is a polling implementation.
 
Since services cannot be guaranteed to be thread-safe; it maintains an internal object pool that is independently sizeable.
In the adapter configuration file this class is aliased as thread-context-workflow which is the preferred alternative to the fully qualified classname when building your configuration.
- 
Nested Class SummaryNested classes/interfaces inherited from class com.adaptris.core.WorkflowWithObjectPoolWorkflowWithObjectPool.Worker, WorkflowWithObjectPool.WorkerFactory
- 
Field SummaryFields inherited from class com.adaptris.core.WorkflowWithObjectPoolDEFAULT_MAX_IDLE, DEFAULT_MAX_POOLSIZE, DEFAULT_MIN_IDLEFields inherited from class com.adaptris.core.WorkflowImpeventHandler, log, startTime, stopTimeFields inherited from interface com.adaptris.core.WorkflowPREVIOUS_GUID_KEY, WORKFLOW_ID_KEY
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidClose the workflow.Get the friendly name for this component.Append the current thread name to any generated friendly name.Log the internal object pool state.protected voidInitialise the workflow.protected voidonMessage(AdaptrisMessage msg) voidsetAddCurrentThreadName(Boolean addCurrentThreadName) Append the current thread name to any generated friendly name.voidsetAdditionalDebug(Boolean additionalDebug) Log the internal object pool state.protected voidStart the workflow.protected voidStop the workflow.Methods inherited from class com.adaptris.core.WorkflowWithObjectPoolcheckPoolConfig, cloneServiceCollection, createObjectPool, getInitWaitTime, getMaxIdle, getMinIdle, getPoolSize, initWaitTimeMs, maxIdle, minIdle, onAdaptrisMessage, poolSize, populatePool, preFlightServiceCheck, prepareWorkflow, resubmitMessage, returnObject, setInitWaitTime, setMaxIdle, setMinIdle, setPoolSizeMethods inherited from class com.adaptris.core.WorkflowImpaddConsumeLocation, addInterceptor, changeState, channelUnavailableWait, close, copyExceptionHeaders, disableMessageCount, doProduce, getChannelUnavailableWaitInterval, getComments, getConsumer, getDisableDefaultMessageCount, getInterceptors, 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, sendEvents, sendMessageLifecycleEvent, setChannelUnavailableWaitInterval, setComments, setConsumer, setDisableDefaultMessageCount, setInterceptors, setMessageErrorHandler, setMessageLogger, setProduceExceptionHandler, setProducer, setSendEvents, setServiceCollection, setUniqueId, start, stop, workflowEnd, workflowStartMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.adaptris.core.AdaptrisMessageListeneronAdaptrisMessage, onAdaptrisMessage
- 
Constructor Details- 
ThreadContextWorkflowpublic ThreadContextWorkflow()
 
- 
- 
Method Details- 
onMessage- Specified by:
- onMessagein class- WorkflowWithObjectPool
 
- 
friendlyNameDescription copied from interface:AdaptrisMessageListenerGet the friendly name for this component.- Specified by:
- friendlyNamein interface- AdaptrisMessageListener
- Overrides:
- friendlyNamein class- WorkflowImp
- Returns:
- the friendly name.
 
- 
initialiseWorkflowDescription copied from class:WorkflowImpInitialise the workflow.- Specified by:
- initialiseWorkflowin class- WorkflowImp
- Throws:
- CoreException- encapsulating any underlying Exception
 
- 
startWorkflowDescription copied from class:WorkflowImpStart the workflow.- Specified by:
- startWorkflowin class- WorkflowImp
- Throws:
- CoreException- encapsulating any underlying Exception
- See Also:
 
- 
stopWorkflowprotected void stopWorkflow()Description copied from class:WorkflowImpStop the workflow.- Specified by:
- stopWorkflowin class- WorkflowImp
 
- 
closeWorkflowprotected void closeWorkflow()Description copied from class:WorkflowImpClose the workflow.- Specified by:
- closeWorkflowin class- WorkflowImp
 
- 
getAddCurrentThreadNameAppend the current thread name to any generated friendly name.If you are using this workflow, then there may be thread naming in play (by jetty or otherwise) which you may wish to preserve. Setting this flag to true means that the current thread name from Thread.currentThread().currentName()is appended to any generated friendly name.It defaults to true if not explicitly configured 
- 
setAddCurrentThreadNameAppend the current thread name to any generated friendly name.If you are using this workflow, then there may be thread naming in play (by jetty or otherwise) which you may wish to preserve. Setting this flag to true means that the current thread name from Thread.currentThread().currentName()is appended to any generated friendly name.It defaults to true if not explicitly configured 
- 
getAdditionalDebugLog the internal object pool state.
- 
setAdditionalDebugLog the internal object pool state.
 
-