org.apache.camel.management.mbean
Class ManagedPerformanceCounter

java.lang.Object
  extended by org.apache.camel.management.mbean.ManagedCounter
      extended by org.apache.camel.management.mbean.ManagedPerformanceCounter
All Implemented Interfaces:
PerformanceCounter
Direct Known Subclasses:
ManagedProcessor, ManagedRoute

@ManagedResource(description="PerformanceCounter")
public abstract class ManagedPerformanceCounter
extends ManagedCounter
implements PerformanceCounter


Field Summary
 
Fields inherited from class org.apache.camel.management.mbean.ManagedCounter
exchangesTotal
 
Constructor Summary
ManagedPerformanceCounter()
           
 
Method Summary
 void completedExchange(long time)
          This method is called when an exchange has been processed successfully.
 void failedExchange()
          This method is called when an exchange has been processed and failed.
 long getExchangesCompleted()
           
 long getExchangesFailed()
           
 Date getFirstExchangeCompletedTimestamp()
           
 Date getFirstExchangeFailureTimestamp()
           
 Date getLastExchangeCompletedTimestamp()
           
 Date getLastExchangeFailureTimestamp()
           
 long getLastProcessingTime()
           
 long getMaxProcessingTime()
           
 long getMeanProcessingTime()
           
 long getMinProcessingTime()
           
 long getTotalProcessingTime()
           
 void init(ManagementStrategy strategy)
           
 boolean isStatisticsEnabled()
          Is statistics enabled.
 void reset()
           
 void setStatisticsEnabled(boolean statisticsEnabled)
          Sets whether statistics is enabled.
 
Methods inherited from class org.apache.camel.management.mbean.ManagedCounter
getExchangesTotal, increment
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ManagedPerformanceCounter

public ManagedPerformanceCounter()
Method Detail

init

public void init(ManagementStrategy strategy)
Overrides:
init in class ManagedCounter

reset

@ManagedOperation(description="Reset counters")
public void reset()
Overrides:
reset in class ManagedCounter

getExchangesCompleted

@ManagedAttribute(description="Number of completed exchanges")
public long getExchangesCompleted()
                           throws Exception
Throws:
Exception

getExchangesFailed

@ManagedAttribute(description="Number of failed exchanges")
public long getExchangesFailed()
                        throws Exception
Throws:
Exception

getMinProcessingTime

@ManagedAttribute(description="Min Processing Time [milliseconds]")
public long getMinProcessingTime()
                          throws Exception
Throws:
Exception

getMeanProcessingTime

@ManagedAttribute(description="Mean Processing Time [milliseconds]")
public long getMeanProcessingTime()
                           throws Exception
Throws:
Exception

getMaxProcessingTime

@ManagedAttribute(description="Max Processing Time [milliseconds]")
public long getMaxProcessingTime()
                          throws Exception
Throws:
Exception

getTotalProcessingTime

@ManagedAttribute(description="Total Processing Time [milliseconds]")
public long getTotalProcessingTime()
                            throws Exception
Throws:
Exception

getLastProcessingTime

@ManagedAttribute(description="Last Processing Time [milliseconds]")
public long getLastProcessingTime()
                           throws Exception
Throws:
Exception

getLastExchangeCompletedTimestamp

@ManagedAttribute(description="Last Exchange Completed Timestamp")
public Date getLastExchangeCompletedTimestamp()

getFirstExchangeCompletedTimestamp

@ManagedAttribute(description="First Exchange Completed Timestamp")
public Date getFirstExchangeCompletedTimestamp()

getLastExchangeFailureTimestamp

@ManagedAttribute(description="Last Exchange Failed Timestamp")
public Date getLastExchangeFailureTimestamp()

getFirstExchangeFailureTimestamp

@ManagedAttribute(description="First Exchange Failed Timestamp")
public Date getFirstExchangeFailureTimestamp()

isStatisticsEnabled

@ManagedAttribute(description="Statistics enabled")
public boolean isStatisticsEnabled()
Description copied from interface: PerformanceCounter
Is statistics enabled.

They can be enabled and disabled at runtime

Specified by:
isStatisticsEnabled in interface PerformanceCounter
Returns:
whether statistics is enabled or not

setStatisticsEnabled

@ManagedAttribute(description="Statistics enabled")
public void setStatisticsEnabled(boolean statisticsEnabled)
Description copied from interface: PerformanceCounter
Sets whether statistics is enabled.

They can be enabled and disabled at runtime

Specified by:
setStatisticsEnabled in interface PerformanceCounter
Parameters:
statisticsEnabled - whether statistics is enabled or not

completedExchange

public void completedExchange(long time)
This method is called when an exchange has been processed successfully.

Specified by:
completedExchange in interface PerformanceCounter
Parameters:
time - in milliseconds it spent on processing the exchange

failedExchange

public void failedExchange()
This method is called when an exchange has been processed and failed.

Specified by:
failedExchange in interface PerformanceCounter


Apache CAMEL