Class YamlService
- java.lang.Object
-
- de.iip_ecosphere.platform.services.environment.AbstractYamlService
-
- de.iip_ecosphere.platform.services.spring.yaml.YamlService
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<java.lang.String>cmdArgprivate intcpusprivate longdiskprivate java.lang.StringensembleWithprivate intinstancesprivate longmemoryprivate java.util.List<YamlTypedData>parametersprivate YamlProcessprocessprivate java.util.List<YamlRelation>relations-
Fields inherited from interface de.iip_ecosphere.platform.services.spring.descriptor.Service
PROTOCOL_PLACEHOLDER
-
-
Constructor Summary
Constructors Constructor Description YamlService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.longgetDisk()Returns the desired disk space for instances of this service.java.lang.StringgetEnsembleWith()Returns the service id of the ensemble leader.intgetInstances()Returns the desired number of instances of this service to be started in the same process.longgetMemory()Returns the desired memory for instances of this service.java.util.List<YamlTypedData>getParameters()Returns the service-specific configurable parameters.YamlProcessgetProcess()Returns an optional attached process realizing the service.java.util.List<YamlRelation>getRelations()Returns the service-specific relations and command line arguments.voidsetCmdArg(java.util.List<java.lang.String> cmdArg)Defines the command line arguments.voidsetCpus(int cpus)Defines the desired number of CPUs for instances of this service.voidsetDisk(long disk)Defines the desired disk space for instances of this service.voidsetEnsembleWith(java.lang.String ensembleWith)Defines the service id of the ensemble leader starting this service.voidsetInstances(int instances)Defines the desired number of instances of this service to be started in the same process.voidsetMemory(long memory)Defines the desired memory for instances of this service.voidsetParameters(java.util.List<YamlTypedData> parameters)Defines the service-specific configurable parameter.voidsetProcess(YamlProcess process)Defines an optional attached process realizing the service.voidsetRelations(java.util.List<YamlRelation> relations)Defines the service-specific relations and command line arguments.-
Methods inherited from class de.iip_ecosphere.platform.services.environment.AbstractYamlService
getApplicationId, getApplicationInstanceId, getDescription, getId, getKind, getName, getNetMgtKey, getServiceId, getTransportChannel, getVersion, isDeployable, isTopLevel, setApplicationId, setDeployable, setDescription, setId, setKind, setName, setNetMgtKey, setTopLevel, setTransportChannel, setVersion
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.iip_ecosphere.platform.services.spring.descriptor.Service
getApplicationId, getApplicationInstanceId, getDescription, getId, getKind, getName, getNetMgtKey, getVersion, isDeployable, isTopLevel
-
-
-
-
Field Detail
-
cmdArg
private java.util.List<java.lang.String> cmdArg
-
ensembleWith
private java.lang.String ensembleWith
-
relations
private java.util.List<YamlRelation> relations
-
parameters
private java.util.List<YamlTypedData> parameters
-
process
private YamlProcess process
-
instances
private int instances
-
memory
private long memory
-
disk
private long disk
-
cpus
private int cpus
-
-
Method Detail
-
getCmdArg
public java.util.List<java.lang.String> getCmdArg()
Description copied from interface:ServiceReturns additional/optional command line arguments required to start the service. Placeholders are not replaced.
-
getCmdArg
public java.util.List<java.lang.String> getCmdArg(int port, java.lang.String protocol)Description copied from interface:ServiceReturns 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). SimilarlyService.PROTOCOL_PLACEHOLDERwill be replaced with the AASprotocol.
-
getEnsembleWith
public java.lang.String getEnsembleWith()
Description copied from interface:ServiceReturns the service id of the ensemble leader. The ensemble services shall then be started on its own.- Specified by:
getEnsembleWithin interfaceService- Returns:
- the service id of the ensemble leader (may be null for none)
-
getRelations
public java.util.List<YamlRelation> getRelations()
Description copied from interface:ServiceReturns the service-specific relations and command line arguments.- Specified by:
getRelationsin interfaceService- Returns:
- the relations, may be empty
-
getParameters
public java.util.List<YamlTypedData> getParameters()
Description copied from interface:ServiceReturns the service-specific configurable parameters.- Specified by:
getParametersin interfaceService- Returns:
- the parameter, may be empty
-
getProcess
public YamlProcess getProcess()
Description copied from interface:ServiceReturns an optional attached process realizing the service.- Specified by:
getProcessin interfaceService- Returns:
- the process information, may be null
-
getInstances
public int getInstances()
Description copied from interface:ServiceReturns 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:
getInstancesin interfaceService- Returns:
- the number of instances, ignored if not positive
-
getMemory
public long getMemory()
Description copied from interface:ServiceReturns the desired memory for instances of this service. This property is considered during deployment only if the deployer supports it.
-
getDisk
public long getDisk()
Description copied from interface:ServiceReturns the desired disk space for instances of this service. This property is considered during deployment only if the deployer supports it.
-
getCpus
public int getCpus()
Description copied from interface:ServiceReturns the desired number of CPUs for instances of this service. This property is considered during deployment only if the deployer supports it.
-
setCmdArg
public void setCmdArg(java.util.List<java.lang.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(java.lang.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(java.util.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(java.util.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
-
-