Class TransientCamelContextManager

java.lang.Object
org.apache.camel.test.junit5.TransientCamelContextManager
All Implemented Interfaces:
CamelContextManager

public class TransientCamelContextManager extends Object implements CamelContextManager
  • Field Details

    • template

      protected org.apache.camel.ProducerTemplate template
    • fluentTemplate

      protected org.apache.camel.FluentProducerTemplate fluentTemplate
    • consumer

      protected org.apache.camel.ConsumerTemplate consumer
  • Constructor Details

  • Method Details

    • createCamelContext

      public void createCamelContext(Object test) throws Exception
      Description copied from interface: CamelContextManager
      Creates a new CamelContext
      Specified by:
      createCamelContext in interface CamelContextManager
      Parameters:
      test - the test instance requesting the next context
      Throws:
      Exception - if unable to create the context
    • beforeContextStart

      public void beforeContextStart(Object test) throws Exception
      Description copied from interface: CamelContextManager
      A callback method to be executed before starting the context
      Specified by:
      beforeContextStart in interface CamelContextManager
      Parameters:
      test -
      Throws:
      Exception
    • disableJMX

      protected void disableJMX()
      Disables the JMX agent.
    • enableJMX

      protected void enableJMX()
      Enables the JMX agent.
    • context

      public org.apache.camel.model.ModelCamelContext context()
      Description copied from interface: CamelContextManager
      Gets the reference to the CamelContext instance
      Specified by:
      context in interface CamelContextManager
      Returns:
      the CamelContext instance
    • template

      public org.apache.camel.ProducerTemplate template()
      Description copied from interface: CamelContextManager
      Gets the reference to the producer template created during initialization
      Specified by:
      template in interface CamelContextManager
      Returns:
      the producer template instance
    • fluentTemplate

      public org.apache.camel.FluentProducerTemplate fluentTemplate()
      Description copied from interface: CamelContextManager
      Gets the reference to the fluent producer template created during initialization
      Specified by:
      fluentTemplate in interface CamelContextManager
      Returns:
      the fluent producer template instance
    • consumer

      public org.apache.camel.ConsumerTemplate consumer()
      Description copied from interface: CamelContextManager
      Gets the reference to the consumer template created during initialization
      Specified by:
      consumer in interface CamelContextManager
      Returns:
      the consumer template instance
    • camelContextService

      public org.apache.camel.Service camelContextService()
      Description copied from interface: CamelContextManager
      When a separate service is used to manage the context lifecycle, this returns the reference to that service
      Specified by:
      camelContextService in interface CamelContextManager
      Returns:
      the reference to the context lifecycle service
    • startCamelContext

      public void startCamelContext() throws Exception
      Description copied from interface: CamelContextManager
      Starts the context
      Specified by:
      startCamelContext in interface CamelContextManager
      Throws:
      Exception - if unable to start the context for any reason
    • stopCamelContext

      public void stopCamelContext()
      Description copied from interface: CamelContextManager
      Stops the context
      Specified by:
      stopCamelContext in interface CamelContextManager
    • stop

      public void stop()
      Description copied from interface: CamelContextManager
      Fully stops the manager
      Specified by:
      stop in interface CamelContextManager
    • stopTemplates

      public void stopTemplates()
      Description copied from interface: CamelContextManager
      Stops the templates
      Specified by:
      stopTemplates in interface CamelContextManager
    • doStopCamelContext

      protected void doStopCamelContext(org.apache.camel.CamelContext context, org.apache.camel.Service camelContextService)
    • applyCamelPostProcessor

      protected void applyCamelPostProcessor(Object test) throws Exception
      Throws:
      Exception
    • setGlobalStore

      public void setGlobalStore(org.junit.jupiter.api.extension.ExtensionContext.Store globalStore)
      Description copied from interface: CamelContextManager
      Sets the JUnit's data context that may be used to provide additional information for some tests
      Specified by:
      setGlobalStore in interface CamelContextManager
      Parameters:
      globalStore - JUnit's data context instance
    • dumpRouteCoverage

      public void dumpRouteCoverage(Class<?> clazz, String currentTestName, long time) throws Exception
      Description copied from interface: CamelContextManager
      Dumps the route coverage information
      Specified by:
      dumpRouteCoverage in interface CamelContextManager
      Parameters:
      clazz -
      currentTestName -
      time -
      Throws:
      Exception