java.lang.Object
test.de.iip_ecosphere.platform.connectors.opcuav1.TestServer

public class TestServer extends Object
Implements an OPC UA embedded test server.
Author:
Holger Eichelberger, SSE
  • Field Details

    • SECURE

      protected static final boolean SECURE
      See Also:
    • logger

      private final de.iip_ecosphere.platform.support.logging.Logger logger
    • server

      private final org.eclipse.milo.opcua.sdk.server.OpcUaServer server
    • exampleNamespace

      private final org.eclipse.milo.opcua.sdk.server.api.ManagedNamespaceWithLifecycle exampleNamespace
    • setup

      private final ServerSetup setup
  • Constructor Details

  • Method Details

    • createEndpointConfigurations

      private Set<org.eclipse.milo.opcua.stack.server.EndpointConfiguration> createEndpointConfigurations()
      Creates the endpoint configurations. setup implicitly defines the endpoints to be created and how to secure the endpoints.
      Returns:
      the endpoint configurations
    • buildTcpEndpoint

      private org.eclipse.milo.opcua.stack.server.EndpointConfiguration buildTcpEndpoint(org.eclipse.milo.opcua.stack.server.EndpointConfiguration.Builder base)
      Builds a TCP endpoint for ServerSetup.getTcpPort().
      Parameters:
      base - the base configuration to be extended for HTTPS
      Returns:
      the endpoint configuration
    • buildHttpsEndpoint

      private org.eclipse.milo.opcua.stack.server.EndpointConfiguration buildHttpsEndpoint(org.eclipse.milo.opcua.stack.server.EndpointConfiguration.Builder base)
      Builds an HTTPS endpoint for ServerSetup.getHttpsPort().
      Parameters:
      base - the base configuration to be extended for HTTPS
      Returns:
      the endpoint configuration
    • startup

      public CompletableFuture<org.eclipse.milo.opcua.sdk.server.OpcUaServer> startup()
      Starts the server.
      Returns:
      the future on the start operation, just call CompletableFuture.get()
    • shutdown

      public CompletableFuture<org.eclipse.milo.opcua.sdk.server.OpcUaServer> shutdown()
      Shuts down the server.
      Returns:
      the future on the start operation, just call CompletableFuture.get()