Class ServerSetup

java.lang.Object
test.de.iip_ecosphere.platform.connectors.opcuav1.ServerSetup
Direct Known Subclasses:
NoSecuritySetup, SecureSetup

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

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

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

    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.
    String getPath()
    Returns the URL path on the endpoints.
    int getTcpPort()
    Returns the TCP port to serve.
    abstract 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 Details

  • Constructor Details

    • ServerSetup

      public ServerSetup​(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 Details

    • 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 String getPath()
      Returns the URL path on the endpoints.
      Returns:
      the path
    • initializeApplication

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

      public abstract void shutdownApplication() throws ExecutionException
      Shuts down the application to clean up resources if needed.
      Throws:
      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