Interface ServiceDescriptor

All Known Implementing Classes:
AbstractServiceDescriptor

public interface ServiceDescriptor
Describes a service. Intentionally, a service descriptor does not contain administrative operations form Service as those operations shall be handled by the ServiceManager in consistent manner, e.g., across services.
Author:
Holger Eichelberger, SSE
  • Method Details

    • getId

      String getId()
      Returns the unique id of the service.
      Returns:
      the id (may contain the application id and the application instance id if specified)
    • getApplicationId

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

      default String getServiceId()
      Returns the service id of the service, i.e. getId() without getApplicationId() and getApplicationInstanceId().
      Returns:
      the id
    • getApplicationInstanceId

      default String getApplicationInstanceId()
      Returns the application instance id this service is running within. Usually, the application id shall be a prefix of this id.
      Returns:
      the application instance id (may be empty for the default application instance)
    • getName

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

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

      String getDescription()
      The description of the service.
      Returns:
      the description, may be empty
    • getState

      de.iip_ecosphere.platform.services.environment.ServiceState getState()
      Returns the state the service is currently in. [R4c]
      Returns:
      the state
    • getEnsembleLeader

      ServiceDescriptor getEnsembleLeader()
      Returns the ensemble leader service, i.e., if multiple services are packaged together and shall be executed in the same process, it is important to synchronize aspects (via the ensemble leader service).
      Returns:
      the ensemble leader, may be null if there is none
    • setState

      void setState(de.iip_ecosphere.platform.services.environment.ServiceState state) throws ExecutionException
      Changes the state. [R133c]
      Parameters:
      state - the new state
      Throws:
      ExecutionException - if changing the state fails for some reason
    • isDeployable

      boolean isDeployable()
      Returns whether the service is deployable in distributable manner or fixed in deployment location.
      Returns:
      true for deployable, false for fixed
    • isTopLevel

      boolean isTopLevel()
      Returns whether the service is top-level or nested, e.g., as family member.
      Returns:
      true for top-level, false else
    • getKind

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

      ArtifactDescriptor getArtifact()
      Returns the containing artifact.
      Returns:
      the containing artifact (descriptor)
    • getParameters

      List<TypedDataDescriptor> getParameters()
      Returns all information about parameter for ServiceOperations.reconfigureService(String, Map).
      Returns:
      the name-descriptor mapping for all supported parameters
    • getInputDataConnectors

      List<TypedDataConnectorDescriptor> getInputDataConnectors()
      Returns all (asynchronous) input connectors into this service.
      Returns:
      all input channels, may contain other-sided connectors where TypedDataConnectorDescriptor.getService() is not getId()
    • getOutputDataConnectors

      List<TypedDataConnectorDescriptor> getOutputDataConnectors()
      Returns all (asynchronous) output connectors from this service.
      Returns:
      all input channels, may contain other-sided connectors where TypedDataConnectorDescriptor.getService() is not getId()
    • getDataConnectors

      List<TypedDataConnectorDescriptor> getDataConnectors()
      Returns all (asynchronous) connectors from this service.
      Returns:
      all channels, may contain other-sided connectors where TypedDataConnectorDescriptor.getService() is not getId()
      See Also:
    • getInvocablesCreator

      de.iip_ecosphere.platform.support.aas.InvocablesCreator getInvocablesCreator()
      Returns the invocables creator of this services, e.g., to connect metrics access from an AAS via this creator. Depending on the service manager, there may be prerequisites that this method returns a creator instance.
      Returns:
      the creator, may return InvocablesCreator.NULL_CREATOR but not null
    • setAdditionalArguments

      void setAdditionalArguments(List<String> args)
      Defines additional arguments to be passed on during service start.
      Parameters:
      args - the arguments, may be empty or null for none
    • getAdditionalArguments

      List<String> getAdditionalArguments()
      Returns the additional arguments to be passed on during service start.
      Returns:
      the arguments, may be empty or null for none
    • attachAction

      default void attachAction(ServiceDescriptor.Action action, Runnable run)
      Attaches a runnable to an action.
      Parameters:
      action - the action
      run - the runnable