Interface Service
-
- All Known Implementing Classes:
YamlService
public interface ServiceInformation about a single service.getId()andgetName()must be given, both not empty,#getKind()andgetVersion()must be given, with version in format ofVersion.#getCmdArg()orgetEnsembleWith()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 java.lang.StringPROTOCOL_PLACEHOLDER
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.StringgetApplicationId()Returns the application id this service is assigned to.java.lang.StringgetApplicationInstanceId()Returns the application instance id this service is running within.java.util.List<java.lang.String>getCmdArg()Returns additional/optional command line arguments required to start the service.java.util.List<java.lang.String>getCmdArg(int port, java.lang.String protocol)Returns additional/optional command line arguments required to start the service.intgetCpus()Returns the desired number of CPUs for instances of this service.java.lang.StringgetDescription()Returns the description of the service.longgetDisk()Returns the desired disk space for instances of this service.java.lang.StringgetEnsembleWith()Returns the service id of the ensemble leader.java.lang.StringgetId()Returns the name of the service.intgetInstances()Returns the desired number of instances of this service to be started in the same process.de.iip_ecosphere.platform.services.environment.ServiceKindgetKind()Returns the service kind.longgetMemory()Returns the desired memory for instances of this service.java.lang.StringgetName()Returns the name of the service.java.lang.StringgetNetMgtKey()Returns the network management key of a service instance this service is relying on.java.util.List<? extends TypedData>getParameters()Returns the service-specific configurable parameters.ProcessSpecgetProcess()Returns an optional attached process realizing the service.java.util.List<? extends Relation>getRelations()Returns the service-specific relations and command line arguments.de.iip_ecosphere.platform.support.iip_aas.VersiongetVersion()Returns the version of the service.booleanisDeployable()Returns whether this service is decentrally deployable.booleanisTopLevel()Whether this is a top-level service or a nested service, e.g., in a family.
-
-
-
Field Detail
-
PROTOCOL_PLACEHOLDER
static final java.lang.String PROTOCOL_PLACEHOLDER
- See Also:
- Constant Field Values
-
-
Method Detail
-
getId
java.lang.String getId()
Returns the name of the service.- Returns:
- the name
-
getApplicationId
java.lang.String getApplicationId()
Returns the application id this service is assigned to.- Returns:
- the application id
-
getApplicationInstanceId
java.lang.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
java.lang.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
java.lang.String getName()
Returns the name of the service.- Returns:
- the name
-
getVersion
de.iip_ecosphere.platform.support.iip_aas.Version getVersion()
Returns the version of the service.- Returns:
- the version
-
getDescription
java.lang.String getDescription()
Returns the description of the service.- Returns:
- the description
-
getCmdArg
java.util.List<java.lang.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
java.util.List<java.lang.String> getCmdArg(int port, java.lang.String protocol)Returns additional/optional command line arguments required to start the service. The port placeholderEndpoint.PORT_PLACEHOLDERwill be replaced with the command port the platform is using to send administrative commands to the service (seeService). SimilarlyPROTOCOL_PLACEHOLDERwill be replaced with the AASprotocol.- Parameters:
port- the port used for the command communicationprotocol- the protocol used for the command communication- Returns:
- the resolved command line arguments (may be empty for none)
-
getEnsembleWith
java.lang.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
java.util.List<? extends Relation> getRelations()
Returns the service-specific relations and command line arguments.- Returns:
- the relations, may be empty
-
getParameters
java.util.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:
truefor deployable,falsefor not deployable
-
isTopLevel
boolean isTopLevel()
Whether this is a top-level service or a nested service, e.g., in a family.- Returns:
truefor top-level,falsefor 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
-
-