Class LRASagaService

java.lang.Object
org.apache.camel.support.service.BaseService
org.apache.camel.support.service.ServiceSupport
org.apache.camel.service.lra.LRASagaService
All Implemented Interfaces:
AutoCloseable, org.apache.camel.CamelContextAware, org.apache.camel.saga.CamelSagaService, org.apache.camel.Service, org.apache.camel.ShutdownableService, org.apache.camel.spi.HasCamelContext, org.apache.camel.StatefulService, org.apache.camel.StaticService, org.apache.camel.SuspendableService

@JdkService("lra-saga-service") @Configurer @ManagedResource(description="Managed LRASagaService") public class LRASagaService extends org.apache.camel.support.service.ServiceSupport implements org.apache.camel.StaticService, org.apache.camel.saga.CamelSagaService
A Camel saga service based on Microprofile LRA (https://github.com/eclipse/microprofile-lra).
  • Constructor Details

    • LRASagaService

      public LRASagaService()
  • Method Details

    • newSaga

      public CompletableFuture<org.apache.camel.saga.CamelSagaCoordinator> newSaga(org.apache.camel.Exchange exchange)
      Specified by:
      newSaga in interface org.apache.camel.saga.CamelSagaService
    • getSaga

      public CompletableFuture<org.apache.camel.saga.CamelSagaCoordinator> getSaga(String id)
      Specified by:
      getSaga in interface org.apache.camel.saga.CamelSagaService
    • registerStep

      public void registerStep(org.apache.camel.saga.CamelSagaStep step)
      Specified by:
      registerStep in interface org.apache.camel.saga.CamelSagaService
    • doStart

      protected void doStart() throws Exception
      Overrides:
      doStart in class org.apache.camel.support.service.BaseService
      Throws:
      Exception
    • createLRAClient

      protected LRAClient createLRAClient()
      Use this method to override some behavior within the LRAClient
      Returns:
      the LRAClient to be used within the LRASagaService
    • doStop

      protected void doStop() throws Exception
      Overrides:
      doStop in class org.apache.camel.support.service.BaseService
      Throws:
      Exception
    • setCamelContext

      public void setCamelContext(org.apache.camel.CamelContext camelContext)
      Specified by:
      setCamelContext in interface org.apache.camel.CamelContextAware
    • getCamelContext

      public org.apache.camel.CamelContext getCamelContext()
      Specified by:
      getCamelContext in interface org.apache.camel.spi.HasCamelContext
    • getExecutorService

      public ScheduledExecutorService getExecutorService()
    • getClient

      public LRAClient getClient()
    • getCoordinatorUrl

      @ManagedAttribute(description="Coordinator URL") public String getCoordinatorUrl()
    • setCoordinatorUrl

      public void setCoordinatorUrl(String coordinatorUrl)
    • getCoordinatorContextPath

      @ManagedAttribute(description="Coordinator context-path") public String getCoordinatorContextPath()
    • setCoordinatorContextPath

      public void setCoordinatorContextPath(String coordinatorContextPath)
    • getLocalParticipantUrl

      @ManagedAttribute(description="Local participant URL") public String getLocalParticipantUrl()
    • setLocalParticipantUrl

      public void setLocalParticipantUrl(String localParticipantUrl)
    • getLocalParticipantContextPath

      @ManagedAttribute(description="Local participant context-path") public String getLocalParticipantContextPath()
    • setLocalParticipantContextPath

      public void setLocalParticipantContextPath(String localParticipantContextPath)
    • getRegisteredURIs

      public Set<String> getRegisteredURIs()
    • toString

      public String toString()
      Overrides:
      toString in class Object