org.apache.camel.management
Interface PerformanceCounter

All Known Implementing Classes:
DelegatePerformanceCounter, ManagedBeanProcessor, ManagedDelayer, ManagedPerformanceCounter, ManagedProcessor, ManagedRoute, ManagedSendProcessor, ManagedSuspendableRoute, ManagedThrottler

public interface PerformanceCounter

A counter that gathers performance metrics when Exchange are routed in Camel.

Version:

Method Summary
 void completedExchange(Exchange exchange, long time)
          Executed when an Exchange is complete.
 void failedExchange(Exchange exchange)
          Executed when an Exchange failed.
 boolean isStatisticsEnabled()
          Is statistics enabled.
 void setStatisticsEnabled(boolean statisticsEnabled)
          Sets whether statistics is enabled.
 

Method Detail

completedExchange

void completedExchange(Exchange exchange,
                       long time)
Executed when an Exchange is complete.

Parameters:
exchange - the exchange
time - the time it took in millis to complete it

failedExchange

void failedExchange(Exchange exchange)
Executed when an Exchange failed.

Parameters:
exchange - the exchange

isStatisticsEnabled

boolean isStatisticsEnabled()
Is statistics enabled.

They can be enabled and disabled at runtime

Returns:
whether statistics is enabled or not

setStatisticsEnabled

void setStatisticsEnabled(boolean statisticsEnabled)
Sets whether statistics is enabled.

They can be enabled and disabled at runtime

Parameters:
statisticsEnabled - whether statistics is enabled or not


Apache CAMEL