@ComponentProfile(summary="Interceptor that collates message counts based on metadata",
tag="interceptor")
public class MessageMetricsInterceptorByMetadata
extends MessageMetricsInterceptorImpl
This captures information about a message where that message contains the specified key and and value combination, the value portion may be a regular expression. If the message metadata matches that configured, then it captures the total number of messages that passed through this workflow, and captures the size of messages entering the workflow (but not the total size of messages exiting the workflow); and also the number of messages that had an error condition at the end of the workflow.
In the adapter configuration file this class is aliased as message-metrics-interceptor-by-metadata which is the preferred alternative to the fully qualified classname when building your configuration.
MetricsInterceptorImpl.StatisticsDelta<E extends InterceptorStatistic>WorkflowInterceptorImpl.WorkflowInterceptorExceptionDEFAULT_TIMESLICE_HISTORY_COUNTlog| Constructor and Description |
|---|
MessageMetricsInterceptorByMetadata() |
MessageMetricsInterceptorByMetadata(MetadataElement element) |
| Modifier and Type | Method and Description |
|---|---|
KeyValuePair |
getMetadataElement() |
void |
init()
Initialises the component.
|
void |
setMetadataElement(KeyValuePair m)
Set the metadata element that this interceptor will filter on.
|
void |
workflowEnd(AdaptrisMessage inputMsg,
AdaptrisMessage outputMsg)
Mark the end of a workflow.
|
void |
workflowStart(AdaptrisMessage inputMsg)
Mark the start of a workflow.
|
clearStatistics, close, getStatisticManager, getStats, setStatisticManager, start, statisticManager, stop, updategetTimesliceDuration, getTimesliceHistoryCount, setTimesliceDuration, setTimesliceHistoryCount, timesliceHistoryCountchangeState, getUniqueId, parentChannel, parentWorkflow, prepare, registerParentChannel, registerParentWorkflow, requestClose, requestInit, requestStart, requestStop, retrieveComponentState, setUniqueId, wasSuccessfulclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitprocessingStartpublic MessageMetricsInterceptorByMetadata()
public MessageMetricsInterceptorByMetadata(MetadataElement element)
public void init()
throws CoreException
ComponentLifecycleComponent initialisation includes config verification, creation of connections etc.
init in interface ComponentLifecycleinit in class MessageMetricsInterceptorImplCoreException - wrapping any underlying Exceptionspublic KeyValuePair getMetadataElement()
public void setMetadataElement(KeyValuePair m)
Note that the value part of this metadata may be a regular expression.
m - the metadata element.public void workflowStart(AdaptrisMessage inputMsg)
WorkflowInterceptorinputMsg - the message that will be processed by this workflow.public void workflowEnd(AdaptrisMessage inputMsg, AdaptrisMessage outputMsg)
WorkflowInterceptorinputMsg - 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