Class ServiceFactory

java.lang.Object
de.iip_ecosphere.platform.services.ServiceFactory

public class ServiceFactory extends Object
Provides access to the service manager instance.
Author:
Holger Eichelberger, SSE
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
     
    private static final de.iip_ecosphere.platform.support.logging.Logger
     
    private static ServiceManager
     
    private static de.iip_ecosphere.platform.support.net.NetworkManagerSetup
     
    private static ServiceSetup
     
    private static de.iip_ecosphere.platform.support.iip_aas.AasPartRegistry.AasSetup
     
    private static de.iip_ecosphere.platform.transport.connectors.TransportSetup
     
    private static String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static de.iip_ecosphere.platform.support.iip_aas.AasPartRegistry.AasSetup
    Returns the actual AAS setup for the implementing service manager.
    static de.iip_ecosphere.platform.support.net.NetworkManagerSetup
    Returns the actual network manager setup.
    Returns the service manager.
    Returns the actual service setup for the implementing service manager.
    static Class<?>[]
    getTests(int index)
    Returns a test represented as it's class for execution in jUnit.
    static de.iip_ecosphere.platform.transport.connectors.TransportSetup
    Returns the actual transport setup for the implementing service manager.
    private static void
    Initializes this factory.
    static void
    setAasSetup(de.iip_ecosphere.platform.support.iip_aas.AasPartRegistry.AasSetup instance)
    Defines the AAS setup instance.
    static void
    setNetworkManagerSetup(de.iip_ecosphere.platform.support.net.NetworkManagerSetup instance)
    Defines the network manager setup instance.
    static void
    Sets the YAML path if setup YAML must be read from a nested object.

    Methods inherited from class java.lang.Object

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

    • LOGGER

      private static final de.iip_ecosphere.platform.support.logging.Logger LOGGER
    • desc

      private static ServiceFactoryDescriptor desc
    • manager

      private static ServiceManager manager
    • service

      private static ServiceSetup service
    • setup

      private static de.iip_ecosphere.platform.support.iip_aas.AasPartRegistry.AasSetup setup
    • transport

      private static de.iip_ecosphere.platform.transport.connectors.TransportSetup transport
    • netwMgrSetup

      private static de.iip_ecosphere.platform.support.net.NetworkManagerSetup netwMgrSetup
    • yamlPath

      private static String yamlPath
  • Constructor Details

    • ServiceFactory

      public ServiceFactory()
  • Method Details

    • setYamlPath

      public static void setYamlPath(String path)
      Sets the YAML path if setup YAML must be read from a nested object. Shall be maintained by implementing class or tests. [testing]
      Parameters:
      path - the path, by default none/null
    • init

      private static void init()
      Initializes this factory.
    • getServiceManager

      public static ServiceManager getServiceManager()
      Returns the service manager.
      Returns:
      the service manager
    • getSetup

      public static ServiceSetup getSetup()
      Returns the actual service setup for the implementing service manager.
      Returns:
      the service setup
    • getAasSetup

      public static de.iip_ecosphere.platform.support.iip_aas.AasPartRegistry.AasSetup getAasSetup()
      Returns the actual AAS setup for the implementing service manager.
      Returns:
      the AAS setup
    • getNetworkManagerSetup

      public static de.iip_ecosphere.platform.support.net.NetworkManagerSetup getNetworkManagerSetup()
      Returns the actual network manager setup.
      Returns:
      the network manager setup
    • getTransport

      public static de.iip_ecosphere.platform.transport.connectors.TransportSetup getTransport()
      Returns the actual transport setup for the implementing service manager.
      Returns:
      the AAS setup
    • setAasSetup

      public static void setAasSetup(de.iip_ecosphere.platform.support.iip_aas.AasPartRegistry.AasSetup instance)
      Defines the AAS setup instance.
      Parameters:
      instance - the new setup instance
    • setNetworkManagerSetup

      public static void setNetworkManagerSetup(de.iip_ecosphere.platform.support.net.NetworkManagerSetup instance)
      Defines the network manager setup instance.
      Parameters:
      instance - the new setup instance
    • getTests

      public static Class<?>[] getTests(int index)
      Returns a test represented as it's class for execution in jUnit. This is required if a test running a service manager and other components like AAS as plugins shall get execute a test independently. Delegates the work to ServiceFactoryDescriptor. [testing]
      Parameters:
      index - a 0-based index of the test/suite to return; usually test and implementing service manager are in close relationship and know the valid indexes
      Returns:
      the test classes or null if there is none for the given index