java.lang.Object
de.iip_ecosphere.platform.services.environment.AbstractYamlService
de.iip_ecosphere.platform.services.spring.yaml.YamlService
All Implemented Interfaces:
Service

public class YamlService extends de.iip_ecosphere.platform.services.environment.AbstractYamlService implements Service
Information about a single service.
Author:
Holger Eichelberger, SSE
  • Field Details

    • cmdArg

      private List<String> cmdArg
    • ensembleWith

      private String ensembleWith
    • relations

      private List<YamlRelation> relations
    • parameters

      private List<YamlTypedData> parameters
    • process

      private YamlProcess process
    • instances

      private int instances
    • memory

      private long memory
    • disk

      private long disk
    • cpus

      private int cpus
  • Constructor Details

    • YamlService

      public YamlService()
  • Method Details

    • getCmdArg

      public List<String> getCmdArg()
      Description copied from interface: Service
      Returns additional/optional command line arguments required to start the service. Placeholders are not replaced.
      Specified by:
      getCmdArg in interface Service
      Returns:
      the command line arguments (may be empty for none)
    • getCmdArg

      public List<String> getCmdArg(int port, String protocol)
      Description copied from interface: Service
      Returns additional/optional command line arguments required to start the service. The port placeholder Endpoint.PORT_PLACEHOLDER will be replaced with the command port the platform is using to send administrative commands to the service (see Service). Similarly Service.PROTOCOL_PLACEHOLDER will be replaced with the AAS protocol.
      Specified by:
      getCmdArg in interface Service
      Parameters:
      port - the port used for the command communication
      protocol - the protocol used for the command communication
      Returns:
      the resolved command line arguments (may be empty for none)
    • getEnsembleWith

      public String getEnsembleWith()
      Description copied from interface: Service
      Returns the service id of the ensemble leader. The ensemble services shall then be started on its own.
      Specified by:
      getEnsembleWith in interface Service
      Returns:
      the service id of the ensemble leader (may be null for none)
    • getRelations

      public List<YamlRelation> getRelations()
      Description copied from interface: Service
      Returns the service-specific relations and command line arguments.
      Specified by:
      getRelations in interface Service
      Returns:
      the relations, may be empty
    • getParameters

      public List<YamlTypedData> getParameters()
      Description copied from interface: Service
      Returns the service-specific configurable parameters.
      Specified by:
      getParameters in interface Service
      Returns:
      the parameter, may be empty
    • getProcess

      public YamlProcess getProcess()
      Description copied from interface: Service
      Returns an optional attached process realizing the service.
      Specified by:
      getProcess in interface Service
      Returns:
      the process information, may be null
    • getInstances

      public int getInstances()
      Description copied from interface: Service
      Returns the desired number of instances of this service to be started in the same process. This property is considered during deployment only if the deployer supports it.
      Specified by:
      getInstances in interface Service
      Returns:
      the number of instances, ignored if not positive
    • getMemory

      public long getMemory()
      Description copied from interface: Service
      Returns the desired memory for instances of this service. This property is considered during deployment only if the deployer supports it.
      Specified by:
      getMemory in interface Service
      Returns:
      the desired memory in Mebibytes (i.e., "m"), ignored if not positive
    • getDisk

      public long getDisk()
      Description copied from interface: Service
      Returns the desired disk space for instances of this service. This property is considered during deployment only if the deployer supports it.
      Specified by:
      getDisk in interface Service
      Returns:
      the desired disk space in Mebibytes (i.e., "m"), ignored if not positive
    • getCpus

      public int getCpus()
      Description copied from interface: Service
      Returns the desired number of CPUs for instances of this service. This property is considered during deployment only if the deployer supports it.
      Specified by:
      getCpus in interface Service
      Returns:
      the desired number of CPUs , ignored if not positive
    • setCmdArg

      public void setCmdArg(List<String> cmdArg)
      Defines the command line arguments. [required by SnakeYaml]
      Parameters:
      cmdArg - the command line arguments (may be empty for none)
    • setEnsembleWith

      public void setEnsembleWith(String ensembleWith)
      Defines the service id of the ensemble leader starting this service. [required by SnakeYaml]
      Parameters:
      ensembleWith - the service id of the ensemble leader (may be null for none)
    • setRelations

      public void setRelations(List<YamlRelation> relations)
      Defines the service-specific relations and command line arguments. [required by SnakeYaml]
      Parameters:
      relations - the relations, may be empty
    • setParameters

      public void setParameters(List<YamlTypedData> parameters)
      Defines the service-specific configurable parameter. [required by SnakeYaml]
      Parameters:
      parameters - the parameters, may be empty
    • setProcess

      public void setProcess(YamlProcess process)
      Defines an optional attached process realizing the service. [required by SnakeYaml]
      Parameters:
      process - the process information, may be null
    • setInstances

      public void setInstances(int instances)
      Defines the desired number of instances of this service to be started in the same process. This property is considered during deployment only if the deployer supports it.
      Parameters:
      instances - the number of instances, ignored if not positive
    • setMemory

      public void setMemory(long memory)
      Defines the desired memory for instances of this service. This property is considered during deployment only if the deployer supports it.
      Parameters:
      memory - the desired memory in Mebibytes (i.e., "m"), ignored if not positive
    • setDisk

      public void setDisk(long disk)
      Defines the desired disk space for instances of this service. This property is considered during deployment only if the deployer supports it.
      Parameters:
      disk - the desired disk space in Mebibytes (i.e., "m"), ignored if not positive
    • setCpus

      public void setCpus(int cpus)
      Defines the desired number of CPUs for instances of this service. This property is considered during deployment only if the deployer supports it.
      Parameters:
      cpus - the desired number of CPUs , ignored if not positive