public class DelegatePerformanceCounter extends Object implements PerformanceCounter
PerformanceCounter.
This is used to allow Camel to pre initialize these delegate performance counters
when Camel creates the actual route from the model. Then later as the various
processors, routes etc. is created and registered in the LifecycleStrategy
then we link this to the real ManagedPerformanceCounter mbean
so the mbean can gather statistics.
This delegation is needed as how Camel is designed to register services in the
LifecycleStrategy in various stages.| Constructor and Description |
|---|
DelegatePerformanceCounter() |
| Modifier and Type | Method and Description |
|---|---|
void |
completedExchange(Exchange exchange,
long time)
Executed when an
Exchange is complete. |
void |
failedExchange(Exchange exchange)
Executed when an
Exchange failed. |
boolean |
isStatisticsEnabled()
Are statistics enabled?
They can be enabled and disabled at runtime
|
void |
processExchange(Exchange exchange)
Executed when an
Exchange is about to be processed. |
void |
setCounter(PerformanceCounter counter) |
void |
setStatisticsEnabled(boolean statisticsEnabled)
Sets whether statistics are enabled.
|
String |
toString() |
public void setCounter(PerformanceCounter counter)
public void processExchange(Exchange exchange)
PerformanceCounterExchange is about to be processed.processExchange in interface PerformanceCounterexchange - the exchangepublic void completedExchange(Exchange exchange, long time)
PerformanceCounterExchange is complete.completedExchange in interface PerformanceCounterexchange - the exchangetime - the time it took in millis to completepublic void failedExchange(Exchange exchange)
PerformanceCounterExchange failed.failedExchange in interface PerformanceCounterexchange - the exchangepublic boolean isStatisticsEnabled()
PerformanceCounterisStatisticsEnabled in interface PerformanceCounterpublic void setStatisticsEnabled(boolean statisticsEnabled)
PerformanceCountersetStatisticsEnabled in interface PerformanceCounterstatisticsEnabled - whether statistics are enabled or notApache Camel