org.springframework.integration.monitor
Class LifecycleMessageHandlerMetrics
java.lang.Object
org.springframework.integration.monitor.LifecycleMessageHandlerMetrics
- All Implemented Interfaces:
- Lifecycle, MessageHandlerMetrics
@ManagedResource
public class LifecycleMessageHandlerMetrics
- extends java.lang.Object
- implements MessageHandlerMetrics, Lifecycle
A MessageHandlerMetrics
that exposes in addition the Lifecycle
interface. The lifecycle methods can
be used to stop and start polling endpoints, for instance, in a live system.
- Since:
- 2.0
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LifecycleMessageHandlerMetrics
public LifecycleMessageHandlerMetrics(Lifecycle lifecycle,
MessageHandlerMetrics delegate)
isRunning
@ManagedAttribute
public boolean isRunning()
- Specified by:
isRunning
in interface Lifecycle
start
@ManagedOperation
public void start()
- Specified by:
start
in interface Lifecycle
stop
@ManagedOperation
public void stop()
- Specified by:
stop
in interface Lifecycle
reset
public void reset()
- Specified by:
reset
in interface MessageHandlerMetrics
getErrorCount
public int getErrorCount()
- Specified by:
getErrorCount
in interface MessageHandlerMetrics
- Returns:
- the number of failed handler calls
getHandleCount
public int getHandleCount()
- Specified by:
getHandleCount
in interface MessageHandlerMetrics
- Returns:
- the number of successful handler calls
getMaxDuration
public double getMaxDuration()
- Specified by:
getMaxDuration
in interface MessageHandlerMetrics
- Returns:
- the maximum handler duration (milliseconds)
getMeanDuration
public double getMeanDuration()
- Specified by:
getMeanDuration
in interface MessageHandlerMetrics
- Returns:
- the mean handler duration (milliseconds)
getMinDuration
public double getMinDuration()
- Specified by:
getMinDuration
in interface MessageHandlerMetrics
- Returns:
- the minimum handler duration (milliseconds)
getStandardDeviationDuration
public double getStandardDeviationDuration()
- Specified by:
getStandardDeviationDuration
in interface MessageHandlerMetrics
- Returns:
- the standard deviation handler duration (milliseconds)
getDuration
public Statistics getDuration()
- Specified by:
getDuration
in interface MessageHandlerMetrics
- Returns:
- summary statistics about the handler duration (milliseconds)
getName
public java.lang.String getName()
- Specified by:
getName
in interface MessageHandlerMetrics
getSource
public java.lang.String getSource()
- Specified by:
getSource
in interface MessageHandlerMetrics
getActiveCount
public int getActiveCount()
- Specified by:
getActiveCount
in interface MessageHandlerMetrics