Class Broker.BrokerCreator

java.lang.Object
de.iip_ecosphere.platform.services.environment.services.Broker.BrokerCreator
Enclosing class:
Broker

public static class Broker.BrokerCreator extends Object
Broker creator.
Author:
Holger Eichelberger, SSE
  • Field Details

    • location

      private String location
    • className

      private String className
    • transportConnectorClsName

      private String transportConnectorClsName
    • configProperty

      private String configProperty
    • binderName

      private String[] binderName
    • defaultPort

      private int defaultPort
  • Constructor Details

    • BrokerCreator

      public BrokerCreator(String location, String configProperty, String className, String transportConnectorClsName, int defaultPort, String... binderName)
      Creates a type constant.
      Parameters:
      location - the server configuration location within the executing JAR, may be null or empty for none
      configProperty - the config property determining the local port
      className - the name of the server class, created dynamically due to potential newer libs than JDK 1.8, requires a constructor with ServerAddress as parameter
      transportConnectorClsName - the name of the transport connector
      defaultPort - the default network port
      binderName - the name(s) of the default binder determining the broker to start
  • Method Details

    • getArchiveLocation

      public String getArchiveLocation()
      Returns the archive/packed configuration location.
      Returns:
      the server configuration location within the executing JAR, may be null or empty for none
    • getUnpackedLocation

      public File getUnpackedLocation()
      Returns the unpacked configuration location.
      Returns:
      the server configuration location in development setup, may be null or empty for none
    • getBinderName

      public String getBinderName()
      Returns the name of the default binder determining the broker to start.
      Returns:
      the name of the default binder
    • handlesBinder

      public boolean handlesBinder(String name)
      Returns whether this broker handles the given binder name.
      Parameters:
      name - the binder name
      Returns:
      true for handles, false for not supported
    • getConfigProperty

      public String getConfigProperty()
      Returns the config property determining the local port.
      Returns:
      the config property
    • getDefaultPort

      public int getDefaultPort()
      Returns the default port.
      Returns:
      the default port
    • createInstance

      public de.iip_ecosphere.platform.support.Server createInstance(de.iip_ecosphere.platform.support.ServerAddress addr)
      Creates a server instance.
      Parameters:
      addr - the server address
      Returns:
      the server instance
    • createTransportConnector

      public de.iip_ecosphere.platform.transport.connectors.TransportConnector createTransportConnector()
      Returns an associated (disconnected) transport connector instance.
      Returns:
      the instance
    • isTls

      public boolean isTls()
      Whether we rely on TLS for transport encryption.
      Returns:
      true for TLS, false for plain