Class ManagedCamelContext

All Implemented Interfaces:
org.apache.camel.api.management.mbean.ManagedCamelContextMBean, org.apache.camel.api.management.mbean.ManagedCounterMBean, org.apache.camel.api.management.mbean.ManagedPerformanceCounterMBean, PerformanceCounter, org.apache.camel.TimerListener

@ManagedResource(description="Managed CamelContext") public class ManagedCamelContext extends ManagedPerformanceCounter implements org.apache.camel.TimerListener, org.apache.camel.api.management.mbean.ManagedCamelContextMBean
  • Constructor Details

  • Method Details

    • init

      public void init(org.apache.camel.spi.ManagementStrategy strategy)
      Overrides:
      init in class ManagedPerformanceCounter
    • completedExchange

      public void completedExchange(org.apache.camel.Exchange exchange, long time)
      Description copied from interface: PerformanceCounter
      Executed when an Exchange is complete.
      Specified by:
      completedExchange in interface PerformanceCounter
      Overrides:
      completedExchange in class ManagedPerformanceCounter
      Parameters:
      exchange - the exchange
      time - the time it took in millis to complete
    • failedExchange

      public void failedExchange(org.apache.camel.Exchange exchange)
      Description copied from interface: PerformanceCounter
      Executed when an Exchange failed.
      Specified by:
      failedExchange in interface PerformanceCounter
      Overrides:
      failedExchange in class ManagedPerformanceCounter
      Parameters:
      exchange - the exchange
    • processExchange

      public void processExchange(org.apache.camel.Exchange exchange, String type)
      Description copied from interface: PerformanceCounter
      Executed when an Exchange is about to be processed.
      Specified by:
      processExchange in interface PerformanceCounter
      Overrides:
      processExchange in class ManagedPerformanceCounter
      Parameters:
      exchange - the exchange
      type - the node type
    • getContext

      public org.apache.camel.CamelContext getContext()
    • getCamelId

      public String getCamelId()
      Specified by:
      getCamelId in interface org.apache.camel.api.management.mbean.ManagedCamelContextMBean
    • getCamelDescription

      Specified by:
      getCamelDescription in interface org.apache.camel.api.management.mbean.ManagedCamelContextMBean
    • getManagementName

      Specified by:
      getManagementName in interface org.apache.camel.api.management.mbean.ManagedCamelContextMBean
    • getCamelVersion

      Specified by:
      getCamelVersion in interface org.apache.camel.api.management.mbean.ManagedCamelContextMBean
    • getState

      public String getState()
      Specified by:
      getState in interface org.apache.camel.api.management.mbean.ManagedCamelContextMBean
    • getUptime

      public String getUptime()
      Specified by:
      getUptime in interface org.apache.camel.api.management.mbean.ManagedCamelContextMBean
    • getUptimeMillis

      public long getUptimeMillis()
      Specified by:
      getUptimeMillis in interface org.apache.camel.api.management.mbean.ManagedCamelContextMBean
    • getManagementStatisticsLevel

      Specified by:
      getManagementStatisticsLevel in interface org.apache.camel.api.management.mbean.ManagedCamelContextMBean
    • getClassResolver

      Specified by:
      getClassResolver in interface org.apache.camel.api.management.mbean.ManagedCamelContextMBean
    • getPackageScanClassResolver

      Specified by:
      getPackageScanClassResolver in interface org.apache.camel.api.management.mbean.ManagedCamelContextMBean
    • getApplicationContextClassName

      Specified by:
      getApplicationContextClassName in interface org.apache.camel.api.management.mbean.ManagedCamelContextMBean
    • getHeadersMapFactoryClassName

      Specified by:
      getHeadersMapFactoryClassName in interface org.apache.camel.api.management.mbean.ManagedCamelContextMBean
    • getGlobalOptions

      Specified by:
      getGlobalOptions in interface org.apache.camel.api.management.mbean.ManagedCamelContextMBean
    • getGlobalOption

      public String getGlobalOption(String key) throws Exception
      Specified by:
      getGlobalOption in interface org.apache.camel.api.management.mbean.ManagedCamelContextMBean
      Throws:
      Exception
    • setGlobalOption

      public void setGlobalOption(String key, String value) throws Exception
      Specified by:
      setGlobalOption in interface org.apache.camel.api.management.mbean.ManagedCamelContextMBean
      Throws:
      Exception
    • getTracing

      public Boolean getTracing()
      Specified by:
      getTracing in interface org.apache.camel.api.management.mbean.ManagedCamelContextMBean
    • setTracing

      public void setTracing(Boolean tracing)
      Specified by:
      setTracing in interface org.apache.camel.api.management.mbean.ManagedCamelContextMBean
    • getInflightExchanges

    • getTotalRoutes

      Specified by:
      getTotalRoutes in interface org.apache.camel.api.management.mbean.ManagedCamelContextMBean
    • getStartedRoutes

      Specified by:
      getStartedRoutes in interface org.apache.camel.api.management.mbean.ManagedCamelContextMBean
    • setTimeout

      public void setTimeout(long timeout)
      Specified by:
      setTimeout in interface org.apache.camel.api.management.mbean.ManagedCamelContextMBean
    • getTimeout

      public long getTimeout()
      Specified by:
      getTimeout in interface org.apache.camel.api.management.mbean.ManagedCamelContextMBean
    • setTimeUnit

      public void setTimeUnit(TimeUnit timeUnit)
      Specified by:
      setTimeUnit in interface org.apache.camel.api.management.mbean.ManagedCamelContextMBean
    • getTimeUnit

      Specified by:
      getTimeUnit in interface org.apache.camel.api.management.mbean.ManagedCamelContextMBean
    • setShutdownNowOnTimeout

      public void setShutdownNowOnTimeout(boolean shutdownNowOnTimeout)
      Specified by:
      setShutdownNowOnTimeout in interface org.apache.camel.api.management.mbean.ManagedCamelContextMBean
    • isShutdownNowOnTimeout

      public boolean isShutdownNowOnTimeout()
      Specified by:
      isShutdownNowOnTimeout in interface org.apache.camel.api.management.mbean.ManagedCamelContextMBean
    • getLoad01

      public String getLoad01()
      Specified by:
      getLoad01 in interface org.apache.camel.api.management.mbean.ManagedCamelContextMBean
    • getLoad05

      public String getLoad05()
      Specified by:
      getLoad05 in interface org.apache.camel.api.management.mbean.ManagedCamelContextMBean
    • getLoad15

      public String getLoad15()
      Specified by:
      getLoad15 in interface org.apache.camel.api.management.mbean.ManagedCamelContextMBean
    • getThroughput

      Specified by:
      getThroughput in interface org.apache.camel.api.management.mbean.ManagedCamelContextMBean
    • isUseBreadcrumb

      public boolean isUseBreadcrumb()
      Specified by:
      isUseBreadcrumb in interface org.apache.camel.api.management.mbean.ManagedCamelContextMBean
    • isAllowUseOriginalMessage

      public boolean isAllowUseOriginalMessage()
      Specified by:
      isAllowUseOriginalMessage in interface org.apache.camel.api.management.mbean.ManagedCamelContextMBean
    • isMessageHistory

      public boolean isMessageHistory()
      Specified by:
      isMessageHistory in interface org.apache.camel.api.management.mbean.ManagedCamelContextMBean
    • isLogMask

      public boolean isLogMask()
      Specified by:
      isLogMask in interface org.apache.camel.api.management.mbean.ManagedCamelContextMBean
    • isUseMDCLogging

      public boolean isUseMDCLogging()
      Specified by:
      isUseMDCLogging in interface org.apache.camel.api.management.mbean.ManagedCamelContextMBean
    • isUseDataType

      public boolean isUseDataType()
      Specified by:
      isUseDataType in interface org.apache.camel.api.management.mbean.ManagedCamelContextMBean
    • onTimer

      public void onTimer()
      Specified by:
      onTimer in interface org.apache.camel.TimerListener
    • start

      public void start() throws Exception
      Specified by:
      start in interface org.apache.camel.api.management.mbean.ManagedCamelContextMBean
      Throws:
      Exception
    • stop

      public void stop() throws Exception
      Specified by:
      stop in interface org.apache.camel.api.management.mbean.ManagedCamelContextMBean
      Throws:
      Exception
    • restart

      public void restart() throws Exception
      Specified by:
      restart in interface org.apache.camel.api.management.mbean.ManagedCamelContextMBean
      Throws:
      Exception
    • suspend

      public void suspend() throws Exception
      Specified by:
      suspend in interface org.apache.camel.api.management.mbean.ManagedCamelContextMBean
      Throws:
      Exception
    • resume

      public void resume() throws Exception
      Specified by:
      resume in interface org.apache.camel.api.management.mbean.ManagedCamelContextMBean
      Throws:
      Exception
    • startAllRoutes

      public void startAllRoutes() throws Exception
      Specified by:
      startAllRoutes in interface org.apache.camel.api.management.mbean.ManagedCamelContextMBean
      Throws:
      Exception
    • canSendToEndpoint

      public boolean canSendToEndpoint(String endpointUri)
      Specified by:
      canSendToEndpoint in interface org.apache.camel.api.management.mbean.ManagedCamelContextMBean
    • sendBody

      public void sendBody(String endpointUri, Object body) throws Exception
      Specified by:
      sendBody in interface org.apache.camel.api.management.mbean.ManagedCamelContextMBean
      Throws:
      Exception
    • sendStringBody

      public void sendStringBody(String endpointUri, String body) throws Exception
      Specified by:
      sendStringBody in interface org.apache.camel.api.management.mbean.ManagedCamelContextMBean
      Throws:
      Exception
    • sendBodyAndHeaders

      public void sendBodyAndHeaders(String endpointUri, Object body, Map<String,Object> headers) throws Exception
      Specified by:
      sendBodyAndHeaders in interface org.apache.camel.api.management.mbean.ManagedCamelContextMBean
      Throws:
      Exception
    • requestBody

      public Object requestBody(String endpointUri, Object body) throws Exception
      Specified by:
      requestBody in interface org.apache.camel.api.management.mbean.ManagedCamelContextMBean
      Throws:
      Exception
    • requestStringBody

      public Object requestStringBody(String endpointUri, String body) throws Exception
      Specified by:
      requestStringBody in interface org.apache.camel.api.management.mbean.ManagedCamelContextMBean
      Throws:
      Exception
    • requestBodyAndHeaders

      public Object requestBodyAndHeaders(String endpointUri, Object body, Map<String,Object> headers) throws Exception
      Specified by:
      requestBodyAndHeaders in interface org.apache.camel.api.management.mbean.ManagedCamelContextMBean
      Throws:
      Exception
    • dumpRestsAsXml

      public String dumpRestsAsXml() throws Exception
      Specified by:
      dumpRestsAsXml in interface org.apache.camel.api.management.mbean.ManagedCamelContextMBean
      Throws:
      Exception
    • dumpRestsAsXml

      public String dumpRestsAsXml(boolean resolvePlaceholders) throws Exception
      Specified by:
      dumpRestsAsXml in interface org.apache.camel.api.management.mbean.ManagedCamelContextMBean
      Throws:
      Exception
    • dumpRoutesAsXml

      public String dumpRoutesAsXml() throws Exception
      Specified by:
      dumpRoutesAsXml in interface org.apache.camel.api.management.mbean.ManagedCamelContextMBean
      Throws:
      Exception
    • dumpRoutesAsXml

      public String dumpRoutesAsXml(boolean resolvePlaceholders) throws Exception
      Specified by:
      dumpRoutesAsXml in interface org.apache.camel.api.management.mbean.ManagedCamelContextMBean
      Throws:
      Exception
    • dumpRoutesAsXml

      public String dumpRoutesAsXml(boolean resolvePlaceholders, boolean resolveDelegateEndpoints) throws Exception
      Specified by:
      dumpRoutesAsXml in interface org.apache.camel.api.management.mbean.ManagedCamelContextMBean
      Throws:
      Exception
    • dumpRouteTemplatesAsXml

      Specified by:
      dumpRouteTemplatesAsXml in interface org.apache.camel.api.management.mbean.ManagedCamelContextMBean
      Throws:
      Exception
    • dumpRoutesStatsAsXml

      public String dumpRoutesStatsAsXml(boolean fullStats, boolean includeProcessors) throws Exception
      Specified by:
      dumpRoutesStatsAsXml in interface org.apache.camel.api.management.mbean.ManagedCamelContextMBean
      Throws:
      Exception
    • dumpStepStatsAsXml

      public String dumpStepStatsAsXml(boolean fullStats) throws Exception
      Specified by:
      dumpStepStatsAsXml in interface org.apache.camel.api.management.mbean.ManagedCamelContextMBean
      Throws:
      Exception
    • dumpRoutesCoverageAsXml

      Specified by:
      dumpRoutesCoverageAsXml in interface org.apache.camel.api.management.mbean.ManagedCamelContextMBean
      Throws:
      Exception
    • createEndpoint

      public boolean createEndpoint(String uri) throws Exception
      Specified by:
      createEndpoint in interface org.apache.camel.api.management.mbean.ManagedCamelContextMBean
      Throws:
      Exception
    • removeEndpoints

      public int removeEndpoints(String pattern) throws Exception
      Specified by:
      removeEndpoints in interface org.apache.camel.api.management.mbean.ManagedCamelContextMBean
      Throws:
      Exception
    • reset

      public void reset(boolean includeRoutes) throws Exception
      Specified by:
      reset in interface org.apache.camel.api.management.mbean.ManagedCamelContextMBean
      Throws:
      Exception
    • componentNames

      public Set<String> componentNames() throws Exception
      Specified by:
      componentNames in interface org.apache.camel.api.management.mbean.ManagedCamelContextMBean
      Throws:
      Exception
    • languageNames

      public Set<String> languageNames() throws Exception
      Specified by:
      languageNames in interface org.apache.camel.api.management.mbean.ManagedCamelContextMBean
      Throws:
      Exception
    • dataFormatNames

      public Set<String> dataFormatNames() throws Exception
      Specified by:
      dataFormatNames in interface org.apache.camel.api.management.mbean.ManagedCamelContextMBean
      Throws:
      Exception