Package com.adaptris.core.interceptor
Class MessageMetricsInterceptor
- java.lang.Object
-
- com.adaptris.core.interceptor.WorkflowInterceptorImpl
-
- com.adaptris.core.interceptor.MetricsInterceptorImpl<MessageStatistic>
-
- com.adaptris.core.interceptor.MessageMetricsInterceptorImpl
-
- com.adaptris.core.interceptor.MessageMetricsInterceptor
-
- All Implemented Interfaces:
AdaptrisComponent
,ComponentLifecycle
,ComponentLifecycleExtension
,StateManagedComponent
,WorkflowInterceptor
@ComponentProfile(summary="Interceptor that captures the total number of messages passing through the workflow", tag="interceptor") public class MessageMetricsInterceptor extends MessageMetricsInterceptorImpl
WorkflowInterceptor implementation that exposes metrics via JMX.This workflow interceptor 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 which is the preferred alternative to the fully qualified classname when building your configuration.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.adaptris.core.interceptor.MetricsInterceptorImpl
MetricsInterceptorImpl.StatisticsDelta<E extends InterceptorStatistic>
-
Nested classes/interfaces inherited from class com.adaptris.core.interceptor.WorkflowInterceptorImpl
WorkflowInterceptorImpl.WorkflowInterceptorException
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
UID_SUFFIX
-
Fields inherited from class com.adaptris.core.interceptor.MetricsInterceptorImpl
DEFAULT_TIMESLICE_HISTORY_COUNT
-
Fields inherited from class com.adaptris.core.interceptor.WorkflowInterceptorImpl
log
-
-
Constructor Summary
Constructors Constructor Description MessageMetricsInterceptor()
MessageMetricsInterceptor(java.lang.String uid, TimeInterval timesliceDuration)
MessageMetricsInterceptor(java.lang.String uid, TimeInterval timesliceDuration, java.lang.Integer historyCount)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
workflowEnd(AdaptrisMessage inputMsg, AdaptrisMessage outputMsg)
Mark the end of a workflow.void
workflowStart(AdaptrisMessage inputMsg)
Mark the start of a workflow.-
Methods inherited from class com.adaptris.core.interceptor.MessageMetricsInterceptorImpl
clearStatistics, close, getStatisticManager, getStats, init, setStatisticManager, start, statisticManager, stop, update
-
Methods inherited from class com.adaptris.core.interceptor.MetricsInterceptorImpl
getTimesliceDuration, getTimesliceHistoryCount, setTimesliceDuration, setTimesliceHistoryCount, timesliceHistoryCount
-
Methods inherited from class com.adaptris.core.interceptor.WorkflowInterceptorImpl
changeState, getUniqueId, parentChannel, parentWorkflow, prepare, registerParentChannel, registerParentWorkflow, requestClose, requestInit, requestStart, requestStop, retrieveComponentState, setUniqueId, wasSuccessful
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.adaptris.core.WorkflowInterceptor
processingStart
-
-
-
-
Field Detail
-
UID_SUFFIX
public static final java.lang.String UID_SUFFIX
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MessageMetricsInterceptor
public MessageMetricsInterceptor()
-
MessageMetricsInterceptor
public MessageMetricsInterceptor(java.lang.String uid, TimeInterval timesliceDuration)
-
MessageMetricsInterceptor
public MessageMetricsInterceptor(java.lang.String uid, TimeInterval timesliceDuration, java.lang.Integer historyCount)
-
-
Method Detail
-
workflowStart
public void workflowStart(AdaptrisMessage inputMsg)
Description copied from interface:WorkflowInterceptor
Mark the start of a workflow. This doesn't mean the message has started processing but only that the message will - at some point - be processed by the workflow.- Parameters:
inputMsg
- the message that will be processed by this workflow.
-
workflowEnd
public void workflowEnd(AdaptrisMessage inputMsg, AdaptrisMessage outputMsg)
Description copied from interface:WorkflowInterceptor
Mark the end of a workflow.- Parameters:
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.- See Also:
CoreConstants.OBJ_METADATA_EXCEPTION
-
-