Package org.apache.camel.management
Class DelegatePerformanceCounter
java.lang.Object
org.apache.camel.management.DelegatePerformanceCounter
- All Implemented Interfaces:
PerformanceCounter
Delegates to another
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcompletedExchange(org.apache.camel.Exchange exchange, long time) Executed when anExchangeis complete.voidfailedExchange(org.apache.camel.Exchange exchange) Executed when anExchangefailed.booleanAre statistics enabled?voidprocessExchange(org.apache.camel.Exchange exchange, String type) Executed when anExchangeis about to be processed.voidsetCounter(PerformanceCounter counter) voidsetStatisticsEnabled(boolean statisticsEnabled) Sets whether statistics are enabled.toString()
-
Constructor Details
-
DelegatePerformanceCounter
public DelegatePerformanceCounter()
-
-
Method Details
-
setCounter
-
processExchange
Description copied from interface:PerformanceCounterExecuted when anExchangeis about to be processed.- Specified by:
processExchangein interfacePerformanceCounter- Parameters:
exchange- the exchangetype- the node type
-
completedExchange
Description copied from interface:PerformanceCounterExecuted when anExchangeis complete.- Specified by:
completedExchangein interfacePerformanceCounter- Parameters:
exchange- the exchangetime- the time it took in millis to complete
-
failedExchange
Description copied from interface:PerformanceCounterExecuted when anExchangefailed.- Specified by:
failedExchangein interfacePerformanceCounter- Parameters:
exchange- the exchange
-
isStatisticsEnabled
Description copied from interface:PerformanceCounterAre statistics enabled? They can be enabled and disabled at runtime- Specified by:
isStatisticsEnabledin interfacePerformanceCounter- Returns:
- whether statistics are enabled or not
-
setStatisticsEnabled
Description copied from interface:PerformanceCounterSets whether statistics are enabled. They can be enabled and disabled at runtime- Specified by:
setStatisticsEnabledin interfacePerformanceCounter- Parameters:
statisticsEnabled- whether statistics are enabled or not
-
toString
-