Class MetricsRoutePolicyFactory
- java.lang.Object
-
- org.apache.camel.component.metrics.routepolicy.MetricsRoutePolicyFactory
-
- All Implemented Interfaces:
org.apache.camel.spi.RoutePolicyFactory
public class MetricsRoutePolicyFactory extends Object implements org.apache.camel.spi.RoutePolicyFactory
ARoutePolicyFactoryto plugin and use metrics for gathering route utilization statistics
-
-
Constructor Summary
Constructors Constructor Description MetricsRoutePolicyFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.camel.spi.RoutePolicycreateRoutePolicy(org.apache.camel.CamelContext camelContext, String routeId, org.apache.camel.NamedNode routeDefinition)TimeUnitgetDurationUnit()StringgetJmxDomain()com.codahale.metrics.MetricRegistrygetMetricsRegistry()StringgetNamePattern()TimeUnitgetRateUnit()booleanisPrettyPrint()booleanisUseJmx()voidsetDurationUnit(TimeUnit durationUnit)Sets the time unit to use for timing the duration of processing a message in the routevoidsetJmxDomain(String jmxDomain)The JMX domain name to use for the enlisted JMX MBeans.voidsetMetricsRegistry(com.codahale.metrics.MetricRegistry metricsRegistry)To use a specificMetricRegistryinstance.voidsetNamePattern(String namePattern)voidsetPrettyPrint(boolean prettyPrint)Whether to use pretty print when outputting JSonvoidsetRateUnit(TimeUnit rateUnit)Sets the time unit to use for requests per unit (eg requests per second)voidsetUseJmx(boolean useJmx)Whether to use JMX reported to enlist JMX MBeans with the metrics statistics.
-
-
-
Method Detail
-
setMetricsRegistry
public void setMetricsRegistry(com.codahale.metrics.MetricRegistry metricsRegistry)
To use a specificMetricRegistryinstance. If no instance has been configured, then Camel will create a shared instance to be used.
-
getMetricsRegistry
public com.codahale.metrics.MetricRegistry getMetricsRegistry()
-
isUseJmx
public boolean isUseJmx()
-
setUseJmx
public void setUseJmx(boolean useJmx)
Whether to use JMX reported to enlist JMX MBeans with the metrics statistics.
-
getJmxDomain
public String getJmxDomain()
-
setJmxDomain
public void setJmxDomain(String jmxDomain)
The JMX domain name to use for the enlisted JMX MBeans.
-
isPrettyPrint
public boolean isPrettyPrint()
-
setPrettyPrint
public void setPrettyPrint(boolean prettyPrint)
Whether to use pretty print when outputting JSon
-
getRateUnit
public TimeUnit getRateUnit()
-
setRateUnit
public void setRateUnit(TimeUnit rateUnit)
Sets the time unit to use for requests per unit (eg requests per second)
-
getDurationUnit
public TimeUnit getDurationUnit()
-
setDurationUnit
public void setDurationUnit(TimeUnit durationUnit)
Sets the time unit to use for timing the duration of processing a message in the route
-
getNamePattern
public String getNamePattern()
-
setNamePattern
public void setNamePattern(String namePattern)
-
createRoutePolicy
public org.apache.camel.spi.RoutePolicy createRoutePolicy(org.apache.camel.CamelContext camelContext, String routeId, org.apache.camel.NamedNode routeDefinition)- Specified by:
createRoutePolicyin interfaceorg.apache.camel.spi.RoutePolicyFactory
-
-