Class SpringCloudServiceSetup
java.lang.Object
de.iip_ecosphere.platform.services.ServiceSetup
de.iip_ecosphere.platform.services.spring.SpringCloudServiceSetup
- All Implemented Interfaces:
de.iip_ecosphere.platform.support.setup.PluginsSetup
@ConfigurationProperties(prefix="service-mgr")
@Component
public class SpringCloudServiceSetup
extends de.iip_ecosphere.platform.services.ServiceSetup
Configures the service manager.
- Author:
- Holger Eichelberger, SSE
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intprivate Stringprivate intprivate booleanprivate Stringprivate Fileprivate Fileprivate intFields inherited from class de.iip_ecosphere.platform.services.ServiceSetup
ENV_SUPPORTED_APPIDS, PROPERTY_SUPPORTED_APPIDS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturns the delay between two availability checks.Returns the name of the broker host.intReturns the broker port.booleanReturns whether artifacts may be deleted.Returns the name of the descriptor file to load from an artifact.Returns the download directory for artifacts.getExecutable(String executable) Returns the configured value for an executable, i.e., either from the configured executables mapping or theExecutable.Returns the Java command line options.Returns the directory for shared service libraries.intReturns the waiting time for longer operations, e.g., deploying a service.voidsetAvailabilityRetryDelay(int availabilityRetryDelay) Changes the delay between two availability checks.voidsetBrokerHost(String brokerHost) Defines the name of the broker host.voidsetBrokerPort(int brokerPort) Defines the broker port.voidsetDeleteArtifacts(boolean deleteArtifacts) Defines whether artifacts may be deleted.voidsetDescriptorName(String descriptorName) Defines the name of the descriptor file to load from an artifact.voidsetDownloadDir(File downloadDir) Defines the download directory for artifacts.voidsetExecutables(HashMap<String, String> executables) Defines the executables mapping, i.e., an optional mapping of OS command names to paths or other command names that are available on the respective target system.voidsetJavaOpts(List<String> javaOpts) Sets the Java command line options.voidsetSharedLibs(File sharedLibs) Changes the directory for shared service libraries.voidsetWaitingTime(int waitingTime) Defines the waiting time for longer operations, e.g., deploying a service.Methods inherited from class de.iip_ecosphere.platform.services.ServiceSetup
getAas, getAppPluginsFolder, getNetMgr, getPluginsFolder, getServiceCmdArgs, getServiceProtocol, getSupportedAppIds, getTransport, getUpdateAppPlugins, setAas, setAppPluginsFolder, setAppPluginsFolderFile, setNetMgr, setPluginsFolder, setPluginsFolderFile, setServiceCmdArgs, setServiceProtocol, setSupportedAppIds, setTransport, setUpdateAppPlugins
-
Field Details
-
brokerHost
-
brokerPort
private int brokerPort -
deleteArtifacts
private boolean deleteArtifacts -
downloadDir
-
descriptorName
-
waitingTime
private int waitingTime -
availabilityRetryDelay
private int availabilityRetryDelay -
executables
-
javaOpts
-
-
Constructor Details
-
SpringCloudServiceSetup
public SpringCloudServiceSetup()
-
-
Method Details
-
getBrokerHost
Returns the name of the broker host.- Returns:
- the host name (usually "localhost")
-
getBrokerPort
public int getBrokerPort()Returns the broker port.- Returns:
- the broker port (by default 8883)
-
getDeleteArtifacts
public boolean getDeleteArtifacts()Returns whether artifacts may be deleted.- Returns:
truefor delete,falseelse
-
getDownloadDir
Returns the download directory for artifacts.- Returns:
- the download directory (if null use temporary directory/files)
-
getDescriptorName
Returns the name of the descriptor file to load from an artifact.- Returns:
- the name of the descriptor file
-
getWaitingTime
public int getWaitingTime()Returns the waiting time for longer operations, e.g., deploying a service.- Returns:
- the waiting time in ms
-
getAvailabilityRetryDelay
public int getAvailabilityRetryDelay()Returns the delay between two availability checks.- Returns:
- the retry delay in ms
-
getExecutable
Returns the configured value for an executable, i.e., either from the configured executables mapping or theExecutable. The idea here is to allow the configuration to override commands that are available via the OS path in certain cases.- Parameters:
executable- the executable to look for- Returns:
- either
executableor the mapped executable value
-
getJavaOpts
Returns the Java command line options.- Returns:
- the command line options (disables by default log4j format lookups)
-
setBrokerHost
Defines the name of the broker host. [required by Spring]- Parameters:
brokerHost- the host name
-
setBrokerPort
public void setBrokerPort(int brokerPort) Defines the broker port. [required by Spring]- Parameters:
brokerPort- the broker port
-
setDeleteArtifacts
public void setDeleteArtifacts(boolean deleteArtifacts) Defines whether artifacts may be deleted. [required by Spring]- Parameters:
deleteArtifacts-truefor delete,falseelse
-
setDownloadDir
Defines the download directory for artifacts. [required by Spring]- Parameters:
downloadDir- the download directory (if null use temporary directory/files)
-
setDescriptorName
Defines the name of the descriptor file to load from an artifact. [required by Spring]- Parameters:
descriptorName- the name of the descriptor file (ignored if null or empty)
-
setWaitingTime
public void setWaitingTime(int waitingTime) Defines the waiting time for longer operations, e.g., deploying a service. [required by Spring]- Parameters:
waitingTime- the waiting time in ms
-
setAvailabilityRetryDelay
public void setAvailabilityRetryDelay(int availabilityRetryDelay) Changes the delay between two availability checks. [required by Spring]- Parameters:
availabilityRetryDelay- the retry delay in ms
-
setExecutables
Defines the executables mapping, i.e., an optional mapping of OS command names to paths or other command names that are available on the respective target system. [required by Spring]- Parameters:
executables- the executables mapping
-
setJavaOpts
Sets the Java command line options. [required by Spring]- Parameters:
javaOpts- the command line options
-