Class MetricsMessageHistoryService
- java.lang.Object
-
- org.apache.camel.support.service.BaseService
-
- org.apache.camel.support.service.ServiceSupport
-
- org.apache.camel.component.metrics.messagehistory.MetricsMessageHistoryService
-
- All Implemented Interfaces:
AutoCloseable,org.apache.camel.CamelContextAware,MetricsMessageHistoryMBean,org.apache.camel.Service,org.apache.camel.ShutdownableService,org.apache.camel.StatefulService,org.apache.camel.StaticService,org.apache.camel.SuspendableService
@ManagedResource(description="MetricsMessageHistory") public final class MetricsMessageHistoryService extends org.apache.camel.support.service.ServiceSupport implements org.apache.camel.CamelContextAware, org.apache.camel.StaticService, MetricsMessageHistoryMBean
Service holding theMetricsMessageHistorywhich registers all message history metrics.
-
-
Constructor Summary
Constructors Constructor Description MetricsMessageHistoryService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoInit()protected voiddoStart()protected voiddoStop()StringdumpStatisticsAsJson()StringdumpStatisticsAsJsonTimeUnitSeconds()org.apache.camel.CamelContextgetCamelContext()TimeUnitgetDurationUnit()StringgetJmxDomain()com.codahale.metrics.MetricRegistrygetMetricsRegistry()TimeUnitgetRateUnit()booleanisPrettyPrint()booleanisUseJmx()voidreset()voidsetCamelContext(org.apache.camel.CamelContext camelContext)voidsetDurationUnit(TimeUnit durationUnit)voidsetJmxDomain(String jmxDomain)voidsetMetricsRegistry(com.codahale.metrics.MetricRegistry metricsRegistry)voidsetPrettyPrint(boolean prettyPrint)voidsetRateUnit(TimeUnit rateUnit)voidsetUseJmx(boolean useJmx)-
Methods inherited from class org.apache.camel.support.service.BaseService
build, doBuild, doFail, doLifecycleChange, doResume, doShutdown, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
Method Detail
-
getMetricsRegistry
public com.codahale.metrics.MetricRegistry getMetricsRegistry()
-
setMetricsRegistry
public void setMetricsRegistry(com.codahale.metrics.MetricRegistry metricsRegistry)
-
getCamelContext
public org.apache.camel.CamelContext getCamelContext()
- Specified by:
getCamelContextin interfaceorg.apache.camel.CamelContextAware
-
setCamelContext
public void setCamelContext(org.apache.camel.CamelContext camelContext)
- Specified by:
setCamelContextin interfaceorg.apache.camel.CamelContextAware
-
isUseJmx
public boolean isUseJmx()
-
setUseJmx
public void setUseJmx(boolean useJmx)
-
getJmxDomain
public String getJmxDomain()
-
setJmxDomain
public void setJmxDomain(String jmxDomain)
-
isPrettyPrint
public boolean isPrettyPrint()
-
setPrettyPrint
public void setPrettyPrint(boolean prettyPrint)
-
getRateUnit
public TimeUnit getRateUnit()
-
setRateUnit
public void setRateUnit(TimeUnit rateUnit)
-
getDurationUnit
public TimeUnit getDurationUnit()
-
setDurationUnit
public void setDurationUnit(TimeUnit durationUnit)
-
doInit
protected void doInit() throws Exception- Overrides:
doInitin classorg.apache.camel.support.service.BaseService- Throws:
Exception
-
doStart
protected void doStart() throws Exception- Overrides:
doStartin classorg.apache.camel.support.service.BaseService- Throws:
Exception
-
doStop
protected void doStop() throws Exception- Overrides:
doStopin classorg.apache.camel.support.service.BaseService- Throws:
Exception
-
dumpStatisticsAsJson
public String dumpStatisticsAsJson()
- Specified by:
dumpStatisticsAsJsonin interfaceMetricsMessageHistoryMBean
-
dumpStatisticsAsJsonTimeUnitSeconds
public String dumpStatisticsAsJsonTimeUnitSeconds()
- Specified by:
dumpStatisticsAsJsonTimeUnitSecondsin interfaceMetricsMessageHistoryMBean
-
reset
public void reset()
- Specified by:
resetin interfaceMetricsMessageHistoryMBean
-
-