Interface Service
- 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 -
Method Summary
Modifier and TypeMethodDescriptionReturns 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.Returns additional/optional command line arguments required to start the service.intgetCpus()Returns the desired number of CPUs for instances of this service.Returns the description of the service.longgetDisk()Returns the desired disk space for instances of this service.Returns the service id of the ensemble leader.getId()Returns the name of the service.intReturns 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.longReturns the desired memory for instances of this service.getName()Returns the name of the service.Returns the network management key of a service instance this service is relying on.Returns the service-specific configurable parameters.Returns an optional attached process realizing the service.Returns the service-specific relations and command line arguments.de.iip_ecosphere.platform.support.VersionReturns the version of the service.booleanReturns whether this service is decentrally deployable.booleanWhether this is a top-level service or a nested service, e.g., in a family.
-
Field Details
-
PROTOCOL_PLACEHOLDER
- See Also:
-
-
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
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
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
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
Returns the service-specific relations and command line arguments.- Returns:
- the relations, may be empty
-
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
-