Class ServerSetup

  • Direct Known Subclasses:
    NoSecuritySetup, SecureSetup

    public abstract class ServerSetup
    extends java.lang.Object
    Details the server setup.
    Author:
    Holger Eichelberger, SSE
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int httpsPort  
      private java.lang.String path  
      private int tcpPort  
    • Constructor Summary

      Constructors 
      Constructor Description
      ServerSetup​(java.lang.String path, int tcpPort, int httpsPort)
      Creates a server setup instance.
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract void configureCommonEndpointBuilder​(org.eclipse.milo.opcua.stack.server.EndpointConfiguration.Builder builder)
      Configures the common endpoint builder used as basis for the following endpoint builders below.
      abstract org.eclipse.milo.opcua.stack.server.EndpointConfiguration.Builder configureHttpsEndpointBuilder​(org.eclipse.milo.opcua.stack.server.EndpointConfiguration.Builder builder)
      Configures the HTTPS builder on usual non-discovery endpoints.
      abstract org.eclipse.milo.opcua.stack.server.EndpointConfiguration.Builder configureNoSecurityBuilder​(org.eclipse.milo.opcua.stack.server.EndpointConfiguration.Builder builder)
      Configures the no-security builder on usual non-discovery endpoints.
      abstract void configureServerBuilder​(org.eclipse.milo.opcua.sdk.server.api.config.OpcUaServerConfigBuilder builder)
      Configures the server builder.
      abstract org.eclipse.milo.opcua.stack.server.EndpointConfiguration.Builder configureTcpEndpointBuilder​(org.eclipse.milo.opcua.stack.server.EndpointConfiguration.Builder builder)
      Configures the TCP builder on usual non-discovery endpoints.
      abstract de.iip_ecosphere.platform.connectors.ConnectorParameter getConnectorParameter()
      Returns the connector parameter for setting up a corresponding connector.
      int getHttpsPort()
      Returns the HTTPS port to serve.
      java.lang.String getPath()
      Returns the URL path on the endpoints.
      int getTcpPort()
      Returns the TCP port to serve.
      abstract java.lang.String initializeApplication()
      Initializes the application.
      abstract void shutdownApplication()
      Shuts down the application to clean up resources if needed.
      • Methods inherited from class java.lang.Object

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

      • tcpPort

        private int tcpPort
      • httpsPort

        private int httpsPort
      • path

        private java.lang.String path
    • Constructor Detail

      • ServerSetup

        public ServerSetup​(java.lang.String path,
                           int tcpPort,
                           int httpsPort)
        Creates a server setup instance.
        Parameters:
        path - the URL path on the endpoints (no trailing slash)
        tcpPort - the TCP port to serve
        httpsPort - the HTTPS port to serve (although not secured)
    • Method Detail

      • getTcpPort

        public int getTcpPort()
        Returns the TCP port to serve.
        Returns:
        the TCP port
      • getHttpsPort

        public int getHttpsPort()
        Returns the HTTPS port to serve.
        Returns:
        the HTTPS port
      • getPath

        public java.lang.String getPath()
        Returns the URL path on the endpoints.
        Returns:
        the path
      • initializeApplication

        public abstract java.lang.String initializeApplication()
                                                        throws java.util.concurrent.ExecutionException
        Initializes the application.
        Returns:
        the application URL
        Throws:
        java.util.concurrent.ExecutionException - if initializing the application fails
      • shutdownApplication

        public abstract void shutdownApplication()
                                          throws java.util.concurrent.ExecutionException
        Shuts down the application to clean up resources if needed.
        Throws:
        java.util.concurrent.ExecutionException - if shutdown fails.
      • configureCommonEndpointBuilder

        public abstract void configureCommonEndpointBuilder​(org.eclipse.milo.opcua.stack.server.EndpointConfiguration.Builder builder)
        Configures the common endpoint builder used as basis for the following endpoint builders below.
        Parameters:
        builder - the builder
      • configureNoSecurityBuilder

        public abstract org.eclipse.milo.opcua.stack.server.EndpointConfiguration.Builder configureNoSecurityBuilder​(org.eclipse.milo.opcua.stack.server.EndpointConfiguration.Builder builder)
        Configures the no-security builder on usual non-discovery endpoints.
        Parameters:
        builder - the builder
        Returns:
        builder or null for no such endpoint
      • configureTcpEndpointBuilder

        public abstract org.eclipse.milo.opcua.stack.server.EndpointConfiguration.Builder configureTcpEndpointBuilder​(org.eclipse.milo.opcua.stack.server.EndpointConfiguration.Builder builder)
        Configures the TCP builder on usual non-discovery endpoints.
        Parameters:
        builder - the builder
        Returns:
        builder or null for no such endpoint
      • configureHttpsEndpointBuilder

        public abstract org.eclipse.milo.opcua.stack.server.EndpointConfiguration.Builder configureHttpsEndpointBuilder​(org.eclipse.milo.opcua.stack.server.EndpointConfiguration.Builder builder)
        Configures the HTTPS builder on usual non-discovery endpoints.
        Parameters:
        builder - the builder
        Returns:
        builder or null for no such endpoint
      • configureServerBuilder

        public abstract void configureServerBuilder​(org.eclipse.milo.opcua.sdk.server.api.config.OpcUaServerConfigBuilder builder)
        Configures the server builder.
        Parameters:
        builder - the server builder
      • getConnectorParameter

        public abstract de.iip_ecosphere.platform.connectors.ConnectorParameter getConnectorParameter()
        Returns the connector parameter for setting up a corresponding connector. [convenience]
        Returns:
        the connector parameter instance