public class TestServer extends Object
| Modifier and Type | Field and Description |
|---|---|
private org.eclipse.milo.opcua.sdk.server.api.ManagedNamespaceWithLifecycle |
exampleNamespace |
private org.slf4j.Logger |
logger |
protected static boolean |
SECURE |
private org.eclipse.milo.opcua.sdk.server.OpcUaServer |
server |
private ServerSetup |
setup |
| Constructor and Description |
|---|
TestServer(NamespaceCreator namespaceCreator,
ServerSetup setup)
Creates a test server.
|
| Modifier and Type | Method and Description |
|---|---|
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(). |
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(). |
private Set<org.eclipse.milo.opcua.stack.server.EndpointConfiguration> |
createEndpointConfigurations()
Creates the endpoint configurations.
|
CompletableFuture<org.eclipse.milo.opcua.sdk.server.OpcUaServer> |
shutdown()
Shuts down the server.
|
CompletableFuture<org.eclipse.milo.opcua.sdk.server.OpcUaServer> |
startup()
Starts the server.
|
protected static final boolean SECURE
private final org.slf4j.Logger logger
private final org.eclipse.milo.opcua.sdk.server.OpcUaServer server
private final org.eclipse.milo.opcua.sdk.server.api.ManagedNamespaceWithLifecycle exampleNamespace
private final ServerSetup setup
public TestServer(NamespaceCreator namespaceCreator, ServerSetup setup) throws ExecutionException
namespaceCreator - the namespace creatorsetup - the setup for the serverExecutionException - if creating the server fails for some reasonprivate Set<org.eclipse.milo.opcua.stack.server.EndpointConfiguration> createEndpointConfigurations()
setup implicitly defines the endpoints to be created and
how to secure the endpoints.private org.eclipse.milo.opcua.stack.server.EndpointConfiguration buildTcpEndpoint(org.eclipse.milo.opcua.stack.server.EndpointConfiguration.Builder base)
ServerSetup.getTcpPort().base - the base configuration to be extended for HTTPSprivate org.eclipse.milo.opcua.stack.server.EndpointConfiguration buildHttpsEndpoint(org.eclipse.milo.opcua.stack.server.EndpointConfiguration.Builder base)
ServerSetup.getHttpsPort().base - the base configuration to be extended for HTTPSpublic CompletableFuture<org.eclipse.milo.opcua.sdk.server.OpcUaServer> startup()
CompletableFuture.get()public CompletableFuture<org.eclipse.milo.opcua.sdk.server.OpcUaServer> shutdown()
CompletableFuture.get()Copyright © 2022. All rights reserved.