All Known Implementing Classes:
YamlService

public interface Service
Information about a single service. getId() and getName() must be given, both not empty, #getKind() and getVersion() must be given, with version in format of Version. #getCmdArg() or getEnsembleWith() be empty. #getDependencies() and #getRelations() must be given but may be empty. If elements are given, the elements must be valid. #getProcess() may be absent, i.e. null, but if given it must be valid. getInstances(), getMemory(), getDisk(), getCpus() are replaced by default values if invalid.
Author:
Holger Eichelberger, SSE
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the application id this service is assigned to.
    Returns the application instance id this service is running within.
    Returns additional/optional command line arguments required to start the service.
    getCmdArg(int port, String protocol)
    Returns additional/optional command line arguments required to start the service.
    int
    Returns the desired number of CPUs for instances of this service.
    Returns the description of the service.
    long
    Returns the desired disk space for instances of this service.
    Returns the service id of the ensemble leader.
    Returns the name of the service.
    int
    Returns the desired number of instances of this service to be started in the same process.
    de.iip_ecosphere.platform.services.environment.ServiceKind
    Returns the service kind.
    long
    Returns the desired memory for instances of this service.
    Returns the name of the service.
    Returns the network management key of a service instance this service is relying on.
    List<? extends TypedData>
    Returns the service-specific configurable parameters.
    Returns an optional attached process realizing the service.
    List<? extends Relation>
    Returns the service-specific relations and command line arguments.
    de.iip_ecosphere.platform.support.Version
    Returns the version of the service.
    boolean
    Returns whether this service is decentrally deployable.
    boolean
    Whether this is a top-level service or a nested service, e.g., in a family.
  • Field Details

  • Method Details

    • getId

      String getId()
      Returns the name of the service.
      Returns:
      the name
    • getApplicationId

      String getApplicationId()
      Returns the application id this service is assigned to.
      Returns:
      the application id
    • getApplicationInstanceId

      String getApplicationInstanceId()
      Returns the application instance id this service is running within.
      Returns:
      the application instance id (may be empty for the default application instance)
    • getNetMgtKey

      String getNetMgtKey()
      Returns the network management key of a service instance this service is relying on.
      Returns:
      the network management key, may be empty or null for none
    • getName

      String getName()
      Returns the name of the service.
      Returns:
      the name
    • getVersion

      de.iip_ecosphere.platform.support.Version getVersion()
      Returns the version of the service.
      Returns:
      the version
    • getDescription

      String getDescription()
      Returns the description of the service.
      Returns:
      the description
    • getCmdArg

      List<String> getCmdArg()
      Returns additional/optional command line arguments required to start the service. Placeholders are not replaced.
      Returns:
      the command line arguments (may be empty for none)
    • getCmdArg

      List<String> getCmdArg(int port, String protocol)
      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 PROTOCOL_PLACEHOLDER will be replaced with the AAS protocol.
      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

      String getEnsembleWith()
      Returns the service id of the ensemble leader. The ensemble services shall then be started on its own.
      Returns:
      the service id of the ensemble leader (may be null for none)
    • getRelations

      List<? extends Relation> getRelations()
      Returns the service-specific relations and command line arguments.
      Returns:
      the relations, may be empty
    • getParameters

      List<? extends TypedData> getParameters()
      Returns the service-specific configurable parameters.
      Returns:
      the parameter, may be empty
    • getProcess

      ProcessSpec getProcess()
      Returns an optional attached process realizing the service.
      Returns:
      the process information, may be null
    • getKind

      de.iip_ecosphere.platform.services.environment.ServiceKind getKind()
      Returns the service kind.
      Returns:
      the service kind
    • isDeployable

      boolean isDeployable()
      Returns whether this service is decentrally deployable.
      Returns:
      true for deployable, false for not deployable
    • isTopLevel

      boolean isTopLevel()
      Whether this is a top-level service or a nested service, e.g., in a family.
      Returns:
      true for top-level, false for nested
    • getInstances

      int getInstances()
      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.
      Returns:
      the number of instances, ignored if not positive
    • getMemory

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

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

      int getCpus()
      Returns the desired number of CPUs for instances of this service. This property is considered during deployment only if the deployer supports it.
      Returns:
      the desired number of CPUs , ignored if not positive