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 theMetricsMessageHistory
which 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 void
doInit()
protected void
doStart()
protected void
doStop()
String
dumpStatisticsAsJson()
String
dumpStatisticsAsJsonTimeUnitSeconds()
org.apache.camel.CamelContext
getCamelContext()
TimeUnit
getDurationUnit()
String
getJmxDomain()
com.codahale.metrics.MetricRegistry
getMetricsRegistry()
TimeUnit
getRateUnit()
boolean
isPrettyPrint()
boolean
isUseJmx()
void
reset()
void
setCamelContext(org.apache.camel.CamelContext camelContext)
void
setDurationUnit(TimeUnit durationUnit)
void
setJmxDomain(String jmxDomain)
void
setMetricsRegistry(com.codahale.metrics.MetricRegistry metricsRegistry)
void
setPrettyPrint(boolean prettyPrint)
void
setRateUnit(TimeUnit rateUnit)
void
setUseJmx(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:
getCamelContext
in interfaceorg.apache.camel.CamelContextAware
-
setCamelContext
public void setCamelContext(org.apache.camel.CamelContext camelContext)
- Specified by:
setCamelContext
in 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:
doInit
in classorg.apache.camel.support.service.BaseService
- Throws:
Exception
-
doStart
protected void doStart() throws Exception
- Overrides:
doStart
in classorg.apache.camel.support.service.BaseService
- Throws:
Exception
-
doStop
protected void doStop() throws Exception
- Overrides:
doStop
in classorg.apache.camel.support.service.BaseService
- Throws:
Exception
-
dumpStatisticsAsJson
public String dumpStatisticsAsJson()
- Specified by:
dumpStatisticsAsJson
in interfaceMetricsMessageHistoryMBean
-
dumpStatisticsAsJsonTimeUnitSeconds
public String dumpStatisticsAsJsonTimeUnitSeconds()
- Specified by:
dumpStatisticsAsJsonTimeUnitSeconds
in interfaceMetricsMessageHistoryMBean
-
reset
public void reset()
- Specified by:
reset
in interfaceMetricsMessageHistoryMBean
-
-