Class AbstractTaskService

java.lang.Object
com.morpheusdata.core.AbstractTaskService
All Implemented Interfaces:
ExecutableTaskInterface

public abstract class AbstractTaskService extends Object implements ExecutableTaskInterface
Provides helper methods to build task configurations. These builder methods can be called from the various ExecutableTaskInterface execute methods to obtain the necessary resource details for task execution.
See Also:
  • Constructor Details

    • AbstractTaskService

      public AbstractTaskService()
  • Method Details

    • buildLocalTaskConfig

      public io.reactivex.rxjava3.core.Single<TaskConfig> buildLocalTaskConfig(Map baseConfig, Task task, Collection excludes, Map opts)
      Get configuration details for execution in a local context.
      Parameters:
      baseConfig - generally an empty map
      task - the Morpheus Task to be executed
      excludes - String property names to exclude
      opts - options supplied from the execute method
      Returns:
      TaskConfig
    • buildInstanceTaskConfig

      public io.reactivex.rxjava3.core.Single<TaskConfig> buildInstanceTaskConfig(Instance instance, Map baseConfig, Task task, Collection excludes, Map opts)
      Get configuration details for execution on an Instance
      Parameters:
      instance - the provisioned instance
      baseConfig - generally an empty map
      task - the Morpheus Task to be executed
      excludes - String property names to exclude
      opts - options supplied from the execute method
      Returns:
      TaskConfig
    • buildRemoteTaskConfig

      public io.reactivex.rxjava3.core.Single<TaskConfig> buildRemoteTaskConfig(Map baseConfig, Task task, Collection excludes, Map opts)
      Get configuration details for execution in a remote context.
      Parameters:
      baseConfig - generally an empty map
      task - the Morpheus Task to be executed
      excludes - String property names to exclude
      opts - options supplied from the execute method
      Returns:
      TaskConfig
    • buildContainerTaskConfig

      public io.reactivex.rxjava3.core.Single<TaskConfig> buildContainerTaskConfig(Container container, Map baseConfig, Task task, Collection excludes, Map opts)
      Get configuration details for execution in a container.
      Parameters:
      container - the provisioned VM or Container
      baseConfig - generally an empty map
      task - the Morpheus Task to be executed
      excludes - String property names to exclude
      opts - options supplied from the execute method
      Returns:
      TaskConfig
    • buildComputeServerTaskConfig

      public io.reactivex.rxjava3.core.Single<TaskConfig> buildComputeServerTaskConfig(ComputeServer server, Map baseConfig, Task task, Collection excludes, Map opts)
      Get configuration details for execution in a remote server.
      Parameters:
      server - the provisioned server
      baseConfig - generally an empty map
      task - the Morpheus Task to be executed
      excludes - String property names to exclude
      opts - options supplied from the execute method
      Returns:
      TaskConfig