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

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.util.List<java.lang.String> getArtifacts()
      Returns the process implementing artifacts within the containing artifact to be extracted into the process home directory.
      java.util.List<java.lang.String> getCmdArg()
      Returns the command line arguments to start the process.
      java.lang.String getExecutable()
      Returns the system command or relative path within the artifact to be executed.
      java.io.File getExecutablePath()
      Returns an optional path to be prefixed before the executable.
      java.io.File getHomePath()
      Returns the home directory of the process to be executed.
      boolean isStarted()
      Returns whether the underlying process is already started when firing up the service or it will be started through the service implementation.
    • Method Detail

      • getArtifacts

        java.util.List<java.lang.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

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

        java.io.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

        java.io.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

        java.util.List<java.lang.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)
      • 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)