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 Details

    • brokerHost

      private String brokerHost
    • brokerPort

      private int brokerPort
    • deleteArtifacts

      private boolean deleteArtifacts
    • downloadDir

      private File downloadDir
    • descriptorName

      private String descriptorName
    • waitingTime

      private int waitingTime
    • availabilityRetryDelay

      private int availabilityRetryDelay
    • executables

      private HashMap<String,String> executables
    • javaOpts

      private List<String> javaOpts
    • sharedLibs

      private File sharedLibs
  • Constructor Details

    • SpringCloudServiceSetup

      public SpringCloudServiceSetup()
  • Method Details

    • getBrokerHost

      public String 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:
      true for delete, false else
    • getDownloadDir

      public File getDownloadDir()
      Returns the download directory for artifacts.
      Returns:
      the download directory (if null use temporary directory/files)
    • getSharedLibs

      public File getSharedLibs()
      Returns the directory for shared service libraries.
      Returns:
      the shared library directory (if null or empty for none)
    • getDescriptorName

      public String 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

      public String getExecutable(String executable)
      Returns the configured value for an executable, i.e., either from the configured executables mapping or the Executable. 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 executable or the mapped executable value
    • getJavaOpts

      public List<String> getJavaOpts()
      Returns the Java command line options.
      Returns:
      the command line options (disables by default log4j format lookups)
    • setBrokerHost

      public void setBrokerHost(String brokerHost)
      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 - true for delete, false else
    • setDownloadDir

      public void setDownloadDir(File downloadDir)
      Defines the download directory for artifacts. [required by Spring]
      Parameters:
      downloadDir - the download directory (if null use temporary directory/files)
    • setSharedLibs

      public void setSharedLibs(File sharedLibs)
      Changes the directory for shared service libraries.
      Parameters:
      sharedLibs - the shared library directory (if null or empty for none)
    • setDescriptorName

      public void setDescriptorName(String descriptorName)
      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

      public void setExecutables(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. [required by Spring]
      Parameters:
      executables - the executables mapping
    • setJavaOpts

      public void setJavaOpts(List<String> javaOpts)
      Sets the Java command line options. [required by Spring]
      Parameters:
      javaOpts - the command line options