Interface ProcessSpec

All Known Implementing Classes:
YamlProcess, YamlServer

public interface ProcessSpec
If the service is not completely implemented rather than delegates functionality to an additional process that must be started and managed along with the service. The process implementation (whatever it is) will be extracted from getHomePath(). For the execution in a shell, the home directory will be set to the folder where the files in getHomePath() are located. getHomePath() must not be empty, getCmdArg() may be empty.
Author:
Holger Eichelberger, SSE
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the process implementing artifacts within the containing artifact to be extracted into the process home directory.
    Returns the command line arguments to start the process.
    Returns the arguments to be passed to the executable itself.
    Returns the system command or relative path within the artifact to be executed.
    Returns an optional path to be prefixed before the executable.
    Returns the home directory of the process to be executed.
    boolean
    Returns whether the underlying process is already started when firing up the service or it will be started through the service implementation.
  • Method Details

    • getArtifacts

      List<String> getArtifacts()
      Returns the process implementing artifacts within the containing artifact to be extracted into the process home directory.
      Returns:
      the relative paths to the artifacts, shall start with "/" as part of ZIP/JAR
    • getExecutable

      String getExecutable()
      Returns the system command or relative path within the artifact to be executed.
      Returns:
      the command or relative path
    • getExecutablePath

      File getExecutablePath()
      Returns an optional path to be prefixed before the executable. Relevance depends on the execution environment.
      Returns:
      the optional executable path, may be null for none
    • getHomePath

      File getHomePath()
      Returns the home directory of the process to be executed.
      Returns:
      the home directory, may be null to rely on extracted paths, may be given to explicitly define a home path
    • getCmdArg

      List<String> getCmdArg()
      Returns the command line arguments to start the process. The shell will be executed within the folder where the files from getHomePath() are extracted.
      Returns:
      the command line arguments (may be empty for none)
    • getExecArg

      List<String> getExecArg()
      Returns the arguments to be passed to the executable itself. Executable args and command line args may be the same in many cases, but also may differ for Java (-D arguments) or Python/Conda (conda arguments).
      Returns:
      the command line executable arguments (may be empty for none)
    • isStarted

      boolean isStarted()
      Returns whether the underlying process is already started when firing up the service or it will be started through the service implementation. If specified, artifacts will be extracted anyway into the process home directory, assuming that a pre-installed executable will not specify artifacts to be extracted.
      Returns:
      true for started, false else (default)