Class YamlServer
java.lang.Object
de.iip_ecosphere.platform.services.environment.YamlProcess
de.iip_ecosphere.platform.services.environment.YamlServer
- All Implemented Interfaces:
ProcessSpec
Server process specification of servers to be started/stopped with an application.
- Author:
- Holger Eichelberger, SSE
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanExecute the server as an own process.getCls()Returns the class to be started as server.Returns the description of the server.getHost()Returns the host the server instance (may be superseded through a deployment plan).getId()Returns the id of the server, also to be used as network management key.intgetPort()Returns the network port of this server instance.Returns the transport channel for client-server communication.de.iip_ecosphere.platform.support.VersionReturns the version of the server.voidsetAsProcess(boolean asProcess) Changes whether the the server shall be executed as an own process.voidDefines the class to be started as server.voidsetDescription(String description) Defines the description of the service.voidDefined the host the server instance (may be superseded through a deployment plan).voidReturns the id of the server, also to be used as network management key.voidsetPort(int port) Defines the network port of this server instance.voidsetTransportChannel(String transportChannel) Defines the transport channel for client-server communication.voidsetVersion(de.iip_ecosphere.platform.support.Version version) Defines the version of the service.Turns this server into a temporary service instance.Methods inherited from class de.iip_ecosphere.platform.services.environment.YamlProcess
getArtifacts, getCmdArg, getExecArg, getExecutable, getExecutablePath, getHomePath, getLocationKey, getSubstCmdArg, isStarted, setArtifacts, setCmdArg, setExecArg, setExecutable, setExecutablePath, setExecutablePath, setHomePath, setHomePath, setLocationKey, setStarted, toSubstFileName, toSubstFilePath
-
Field Details
-
id
-
version
private de.iip_ecosphere.platform.support.Version version -
description
-
port
private int port -
host
-
cls
-
transportChannel
-
asProcess
private boolean asProcess
-
-
Constructor Details
-
YamlServer
public YamlServer()
-
-
Method Details
-
getId
Returns the id of the server, also to be used as network management key.- Returns:
- the id of the server
-
getVersion
public de.iip_ecosphere.platform.support.Version getVersion()Returns the version of the server.- Returns:
- the version
-
getDescription
Returns the description of the server.- Returns:
- the description
-
getPort
public int getPort()Returns the network port of this server instance.- Returns:
- the network port
-
getHost
Returns the host the server instance (may be superseded through a deployment plan).- Returns:
- the host name
-
getCls
Returns the class to be started as server. Must implementServer.- Returns:
- the class name
-
getTransportChannel
Returns the transport channel for client-server communication.- Returns:
- the transport channel, may be empty or null for none if the service uses an own mechanism (discouraged)
-
getAsProcess
public boolean getAsProcess()Execute the server as an own process.- Returns:
truefor process,falsefor in-service-manager execution
-
setId
Returns the id of the server, also to be used as network management key. [required by SnakeYaml]- Parameters:
id- the id of the server
-
setVersion
public void setVersion(de.iip_ecosphere.platform.support.Version version) Defines the version of the service. [required by SnakeYaml]- Parameters:
version- the version
-
setDescription
Defines the description of the service. [required by SnakeYaml]- Parameters:
description- the description (null is ignored, default is empty)
-
setPort
public void setPort(int port) Defines the network port of this server instance. [required by SnakeYaml]- Parameters:
port- the network port
-
setHost
Defined the host the server instance (may be superseded through a deployment plan). [required by SnakeYaml]- Parameters:
host- the host name
-
setCls
Defines the class to be started as server. Must implementServer.- Parameters:
cls- the class name
-
setTransportChannel
Defines the transport channel for client-server communication.- Parameters:
transportChannel- the transport channel, may be empty or null for none if the service uses an own mechanism (discouraged)
-
setAsProcess
public void setAsProcess(boolean asProcess) Changes whether the the server shall be executed as an own process.- Parameters:
asProcess-truefor process,falsefor in-service-manager execution
-
toService
Turns this server into a temporary service instance.- Returns:
- the service instance
-