Class DefaultOrchestraService

java.lang.Object
com.iantapply.orchestra.administration.DefaultOrchestraService
All Implemented Interfaces:
com.iantapply.orchestra.api.OrchestraService

public final class DefaultOrchestraService extends Object implements com.iantapply.orchestra.api.OrchestraService
Default platform-neutral implementation of the public administration facade.
  • Constructor Details

    • DefaultOrchestraService

      public DefaultOrchestraService(OrchestratorEngine engine, ActionRegistry actions, com.iantapply.orchestra.port.DefinitionRepository definitions, com.iantapply.orchestra.port.ExecutionRepository executions)
      Creates a facade over one fully wired engine and its repositories.
      Parameters:
      engine - orchestration engine
      actions - action and condition registry
      definitions - definition repository
      executions - execution repository
  • Method Details

    • registerDefinition

      public void registerDefinition(com.iantapply.orchestra.api.EventDefinition definition)
      Specified by:
      registerDefinition in interface com.iantapply.orchestra.api.OrchestraService
    • registerAction

      public void registerAction(String type, com.iantapply.orchestra.api.OrchestraAction action)
      Specified by:
      registerAction in interface com.iantapply.orchestra.api.OrchestraService
    • registerCondition

      public void registerCondition(String type, com.iantapply.orchestra.api.OrchestraCondition condition)
      Specified by:
      registerCondition in interface com.iantapply.orchestra.api.OrchestraService
    • startNow

      public UUID startNow(String definitionId)
      Specified by:
      startNow in interface com.iantapply.orchestra.api.OrchestraService
    • schedule

      public UUID schedule(String definitionId, Instant startAt, Map<String,Object> variables)
      Specified by:
      schedule in interface com.iantapply.orchestra.api.OrchestraService
    • addListener

      public void addListener(com.iantapply.orchestra.api.EventLifecycleListener listener)
      Specified by:
      addListener in interface com.iantapply.orchestra.api.OrchestraService
    • pause

      public boolean pause(UUID executionId)
      Specified by:
      pause in interface com.iantapply.orchestra.api.OrchestraService
    • resume

      public boolean resume(UUID executionId)
      Specified by:
      resume in interface com.iantapply.orchestra.api.OrchestraService
    • cancel

      public boolean cancel(UUID executionId)
      Specified by:
      cancel in interface com.iantapply.orchestra.api.OrchestraService
    • retry

      public boolean retry(UUID executionId)
      Specified by:
      retry in interface com.iantapply.orchestra.api.OrchestraService
    • setVariable

      public boolean setVariable(UUID executionId, String key, Object value)
      Specified by:
      setVariable in interface com.iantapply.orchestra.api.OrchestraService
    • execution

      public Optional<com.iantapply.orchestra.domain.EventExecution> execution(UUID executionId)
      Specified by:
      execution in interface com.iantapply.orchestra.api.OrchestraService
    • definitions

      public Collection<com.iantapply.orchestra.api.EventDefinition> definitions()
      Specified by:
      definitions in interface com.iantapply.orchestra.api.OrchestraService
    • activeExecutions

      public Collection<com.iantapply.orchestra.domain.EventExecution> activeExecutions(int limit)
      Specified by:
      activeExecutions in interface com.iantapply.orchestra.api.OrchestraService
    • status

      public com.iantapply.orchestra.api.OrchestraStatus status()
      Specified by:
      status in interface com.iantapply.orchestra.api.OrchestraService