Spring Integration

org.springframework.integration.monitor
Class SimpleMessageHandlerMetrics

java.lang.Object
  extended by org.springframework.integration.monitor.SimpleMessageHandlerMetrics
All Implemented Interfaces:
org.aopalliance.aop.Advice, org.aopalliance.intercept.Interceptor, org.aopalliance.intercept.MethodInterceptor, MessageHandlerMetrics

@ManagedResource
public class SimpleMessageHandlerMetrics
extends java.lang.Object
implements org.aopalliance.intercept.MethodInterceptor, MessageHandlerMetrics

Since:
2.0
Author:
Dave Syer

Constructor Summary
SimpleMessageHandlerMetrics(MessageHandler handler)
           
 
Method Summary
 int getActiveCount()
           
 Statistics getDuration()
           
 int getErrorCount()
           
 int getHandleCount()
           
 double getMaxDuration()
           
 double getMeanDuration()
           
 MessageHandler getMessageHandler()
           
 double getMinDuration()
           
 java.lang.String getName()
           
 java.lang.String getSource()
           
 double getStandardDeviationDuration()
           
 java.lang.Object invoke(org.aopalliance.intercept.MethodInvocation invocation)
           
 void reset()
           
 void setName(java.lang.String name)
           
 void setSource(java.lang.String source)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SimpleMessageHandlerMetrics

public SimpleMessageHandlerMetrics(MessageHandler handler)
Method Detail

setName

public void setName(java.lang.String name)

getName

public java.lang.String getName()
Specified by:
getName in interface MessageHandlerMetrics

setSource

public void setSource(java.lang.String source)

getSource

public java.lang.String getSource()
Specified by:
getSource in interface MessageHandlerMetrics

getMessageHandler

public MessageHandler getMessageHandler()

invoke

public java.lang.Object invoke(org.aopalliance.intercept.MethodInvocation invocation)
                        throws java.lang.Throwable
Specified by:
invoke in interface org.aopalliance.intercept.MethodInterceptor
Throws:
java.lang.Throwable

reset

public void reset()
Specified by:
reset in interface MessageHandlerMetrics

getHandleCount

public int getHandleCount()
Specified by:
getHandleCount in interface MessageHandlerMetrics
Returns:
the number of successful handler calls

getErrorCount

public int getErrorCount()
Specified by:
getErrorCount in interface MessageHandlerMetrics
Returns:
the number of failed handler calls

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)

getMaxDuration

public double getMaxDuration()
Specified by:
getMaxDuration in interface MessageHandlerMetrics
Returns:
the maximum handler duration (milliseconds)

getStandardDeviationDuration

public double getStandardDeviationDuration()
Specified by:
getStandardDeviationDuration in interface MessageHandlerMetrics
Returns:
the standard deviation handler duration (milliseconds)

getActiveCount

public int getActiveCount()
Specified by:
getActiveCount in interface MessageHandlerMetrics

getDuration

public Statistics getDuration()
Specified by:
getDuration in interface MessageHandlerMetrics
Returns:
summary statistics about the handler duration (milliseconds)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

Spring Integration