Class EcsSetup

java.lang.Object
de.iip_ecosphere.platform.support.setup.AbstractSetup
de.iip_ecosphere.platform.support.iip_aas.AasBasedSetup
de.iip_ecosphere.platform.ecsRuntime.EcsSetup
All Implemented Interfaces:
de.iip_ecosphere.platform.support.setup.PluginsSetup

public class EcsSetup extends de.iip_ecosphere.platform.support.iip_aas.AasBasedSetup
ECS runtime setup (poor man's spring approach). Implementing components shall extend this class and add their specific configuration settings. Subclasses must have a no-arg constructor and getters/setters for all configuration values.
Author:
Holger Eichelberger, SSE
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    Common settings for a container manager setup.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private List<String>
     
    private boolean
     
    private int
     
    private de.iip_ecosphere.platform.support.net.NetworkManagerSetup
     
    private de.iip_ecosphere.platform.transport.connectors.TransportSetup
     

    Fields inherited from class de.iip_ecosphere.platform.support.setup.AbstractSetup

    DEFAULT_FNAME, DEFAULT_NAME, DEFAULT_OVERRIDE_FNAME, PARAM_PLUGINS
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns artifact file name infixes that shall be tried before loading a non-infixed default artifact, e.g., a container.
    boolean
    Returns whether automatic on/offboarding is enabled.
    int
    Returns the monitoring update period.
    de.iip_ecosphere.platform.support.net.NetworkManagerSetup
    Returns the network manager setup.
    de.iip_ecosphere.platform.transport.connectors.TransportSetup
    Returns the transport setup.
    static EcsSetup
    Reads a EcsSetup instance from AbstractSetup.DEFAULT_FNAME in the root folder of the jar/classpath.
    static <C extends EcsSetup>
    C
    Reads a EcsSetup instance from AbstractSetup.DEFAULT_FNAME in the root folder of the jar/classpath.
    void
    setArtifactInfixes(List<String> artifactInfixes)
    Defines artifact file name infixes that shall be tried before loading a non-infixed default artifact, e.g., a container.
    void
    setAutoOnOffboarding(boolean implicitOnOffboarding)
    Changes the automatic on/offboarding behavior.
    void
    setMonitoringUpdatePeriod(int monitoringUpdatePeriod)
    Changes the monitoring update period.
    void
    setNetMgr(de.iip_ecosphere.platform.support.net.NetworkManagerSetup netMgr)
    Defines the network manager setup.
    void
    setTransport(de.iip_ecosphere.platform.transport.connectors.TransportSetup transport)
    Defines the transport setup.

    Methods inherited from class de.iip_ecosphere.platform.support.iip_aas.AasBasedSetup

    getAas, setAas

    Methods inherited from class de.iip_ecosphere.platform.support.setup.AbstractSetup

    getDefaultFileName, getPluginsFolder, isNotEmpty, readFromYaml, readFromYaml, readFromYaml, readFromYaml, readFromYaml, readFromYamlWithPath, readFromYamlWithPath, readFromYamlWithPath, readFromYamlWithPath, readMappingFromYaml, readMappingFromYaml, setDefaultFileName, setPluginsFolder, setPluginsFolderFile

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • transport

      private de.iip_ecosphere.platform.transport.connectors.TransportSetup transport
    • netMgr

      private de.iip_ecosphere.platform.support.net.NetworkManagerSetup netMgr
    • monitoringUpdatePeriod

      private int monitoringUpdatePeriod
    • autoOnOffboarding

      private boolean autoOnOffboarding
    • artifactInfixes

      private List<String> artifactInfixes
  • Constructor Details

    • EcsSetup

      public EcsSetup()
  • Method Details

    • getMonitoringUpdatePeriod

      public int getMonitoringUpdatePeriod()
      Returns the monitoring update period.
      Returns:
      the monitoring update period in ms
    • getTransport

      public de.iip_ecosphere.platform.transport.connectors.TransportSetup getTransport()
      Returns the transport setup.
      Returns:
      the transport setup
    • getNetMgr

      public de.iip_ecosphere.platform.support.net.NetworkManagerSetup getNetMgr()
      Returns the network manager setup.
      Returns:
      the network manager setup
    • getAutoOnOffboarding

      public boolean getAutoOnOffboarding()
      Returns whether automatic on/offboarding is enabled.
      Returns:
      true on/offboard always, if false explicit on/offboarding is required
    • getArtifactInfixes

      public List<String> getArtifactInfixes()
      Returns artifact file name infixes that shall be tried before loading a non-infixed default artifact, e.g., a container.
      Returns:
      optional artifact infixes, may be empty
    • setMonitoringUpdatePeriod

      public void setMonitoringUpdatePeriod(int monitoringUpdatePeriod)
      Changes the monitoring update period. [snakeyaml]
      Parameters:
      monitoringUpdatePeriod - in ms, values below 200 are turned to 200
    • setTransport

      public void setTransport(de.iip_ecosphere.platform.transport.connectors.TransportSetup transport)
      Defines the transport setup. [snakeyaml]
      Parameters:
      transport - the transport setup
    • setNetMgr

      public void setNetMgr(de.iip_ecosphere.platform.support.net.NetworkManagerSetup netMgr)
      Defines the network manager setup. [snakeyaml]
      Parameters:
      netMgr - the network manager setup
    • setAutoOnOffboarding

      public void setAutoOnOffboarding(boolean implicitOnOffboarding)
      Changes the automatic on/offboarding behavior. [snakeyaml]
      Parameters:
      implicitOnOffboarding - if true on/offboard always, if false explicit on/offboarding is required
    • setArtifactInfixes

      public void setArtifactInfixes(List<String> artifactInfixes)
      Defines artifact file name infixes that shall be tried before loading a non-infixed default artifact, e.g., a container. [snakeyaml]
      Parameters:
      artifactInfixes - optional artifact infixes, may be empty
    • readConfiguration

      public static <C extends EcsSetup> C readConfiguration(Class<C> cls) throws IOException
      Reads a EcsSetup instance from AbstractSetup.DEFAULT_FNAME in the root folder of the jar/classpath.
      Type Parameters:
      C - the specific type of configuration to read (extended from Configuration}
      Parameters:
      cls - the class of configuration to read
      Returns:
      the configuration instance
      Throws:
      IOException - if the setup cannot be read
      See Also:
      • AbstractSetup.readFromYaml(Class, String)
    • readConfiguration

      public static EcsSetup readConfiguration() throws IOException
      Reads a EcsSetup instance from AbstractSetup.DEFAULT_FNAME in the root folder of the jar/classpath.
      Returns:
      the configuration instance
      Throws:
      IOException - if the setup cannot be read
      See Also:
      • AbstractSetup.readFromYaml(Class)