@ComponentProfile(summary="Interceptor for ensuring JMX submissions are handled correctly", tag="interceptor,jmx") public class JmxSubmitMessageInterceptor extends java.lang.Object implements WorkflowInterceptor
A WorkflowInterceptor
that simply caches all messages that have completed running through
the workflow.
This implementation uses a MessageCache
which is defaulted to
LruBoundedMessageCache
.
In the adapter configuration file this class is aliased as jmx-submit-message-interceptor which is the preferred alternative to the fully qualified classname when building your configuration.
Constructor and Description |
---|
JmxSubmitMessageInterceptor() |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the component.
|
MessageCache |
getMessageCache() |
java.lang.String |
getUniqueId()
Get the unique-id that is associated with this component.
|
void |
init()
Initialises the component.
|
void |
prepare()
Prepare for initialisation.
|
void |
registerParentChannel(Channel c)
Register the parent channel for this WorkflowInterceptor.
|
void |
registerParentWorkflow(Workflow w)
Register the parent workflow for this WorkflowInterceptor.
|
void |
setMessageCache(MessageCache messageCache) |
void |
setUniqueId(java.lang.String uniqueId) |
void |
start()
Starts the component.
|
void |
stop()
Stop the component
|
void |
workflowEnd(AdaptrisMessage inputMsg,
AdaptrisMessage outputMsg)
Mark the end of a workflow.
|
void |
workflowStart(AdaptrisMessage inputMsg)
Mark the start of a workflow.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
processingStart
public void workflowStart(AdaptrisMessage inputMsg)
WorkflowInterceptor
workflowStart
in interface WorkflowInterceptor
inputMsg
- the message that will be processed by this workflow.public void workflowEnd(AdaptrisMessage inputMsg, AdaptrisMessage outputMsg)
WorkflowInterceptor
workflowEnd
in interface WorkflowInterceptor
inputMsg
- the original message that was originally submitted to the workflow; in the event of an exception during
processing, the exception will be stored in object metadata in the inputMsgoutputMsg
- the message contaning any changes that may have been applied by the services within the workflow.CoreConstants.OBJ_METADATA_EXCEPTION
public void prepare() throws CoreException
ComponentLifecycleExtension
prepare
in interface ComponentLifecycleExtension
CoreException
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 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 registerParentChannel(Channel c)
WorkflowInterceptor
registerParentChannel
in interface WorkflowInterceptor
c
- the channelpublic void registerParentWorkflow(Workflow w)
WorkflowInterceptor
registerParentWorkflow
in interface WorkflowInterceptor
w
- the workflow.public java.lang.String getUniqueId()
AdaptrisComponent
getUniqueId
in interface AdaptrisComponent
public void setUniqueId(java.lang.String uniqueId)
public MessageCache getMessageCache()
public void setMessageCache(MessageCache messageCache)