Spring Integration

org.springframework.integration.monitor
Class LifecycleMessageHandlerMetrics

java.lang.Object
  extended by org.springframework.integration.monitor.LifecycleMessageHandlerMetrics
All Implemented Interfaces:
org.springframework.context.Lifecycle, MessageHandlerMetrics

@ManagedResource
public class LifecycleMessageHandlerMetrics
extends java.lang.Object
implements MessageHandlerMetrics, org.springframework.context.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
Author:
Dave Syer

Constructor Summary
LifecycleMessageHandlerMetrics(org.springframework.context.Lifecycle lifecycle, MessageHandlerMetrics delegate)
           
 
Method Summary
 int getActiveCount()
           
 Statistics getDuration()
           
 int getErrorCount()
           
 int getHandleCount()
           
 double getMaxDuration()
           
 double getMeanDuration()
           
 double getMinDuration()
           
 java.lang.String getName()
           
 java.lang.String getSource()
           
 double getStandardDeviationDuration()
           
 boolean isRunning()
           
 void reset()
           
 void start()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LifecycleMessageHandlerMetrics

public LifecycleMessageHandlerMetrics(org.springframework.context.Lifecycle lifecycle,
                                      MessageHandlerMetrics delegate)
Method Detail

isRunning

@ManagedAttribute
public boolean isRunning()
Specified by:
isRunning in interface org.springframework.context.Lifecycle

start

@ManagedOperation
public void start()
Specified by:
start in interface org.springframework.context.Lifecycle

stop

@ManagedOperation
public void stop()
Specified by:
stop in interface org.springframework.context.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

Spring Integration