Class ServerSetup
java.lang.Object
test.de.iip_ecosphere.platform.connectors.opcuav1.ServerSetup
- Direct Known Subclasses:
NoSecuritySetup,SecureSetup
Details the server setup.
- Author:
- Holger Eichelberger, SSE
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionServerSetup(String path, int tcpPort, int httpsPort) Creates a server setup instance. -
Method Summary
Modifier and TypeMethodDescriptionabstract voidconfigureCommonEndpointBuilder(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.BuilderconfigureHttpsEndpointBuilder(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.BuilderconfigureNoSecurityBuilder(org.eclipse.milo.opcua.stack.server.EndpointConfiguration.Builder builder) Configures the no-security builder on usual non-discovery endpoints.abstract voidconfigureServerBuilder(org.eclipse.milo.opcua.sdk.server.api.config.OpcUaServerConfigBuilder builder) Configures the server builder.abstract org.eclipse.milo.opcua.stack.server.EndpointConfiguration.BuilderconfigureTcpEndpointBuilder(org.eclipse.milo.opcua.stack.server.EndpointConfiguration.Builder builder) Configures the TCP builder on usual non-discovery endpoints.abstract de.iip_ecosphere.platform.connectors.ConnectorParameterReturns the connector parameter for setting up a corresponding connector.intReturns the HTTPS port to serve.getPath()Returns the URL path on the endpoints.intReturns the TCP port to serve.abstract StringInitializes the application.abstract voidShuts down the application to clean up resources if needed.
-
Field Details
-
tcpPort
private int tcpPort -
httpsPort
private int httpsPort -
path
-
-
Constructor Details
-
ServerSetup
Creates a server setup instance.- Parameters:
path- the URL path on the endpoints (no trailing slash)tcpPort- the TCP port to servehttpsPort- 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
Returns the URL path on the endpoints.- Returns:
- the path
-
initializeApplication
Initializes the application.- Returns:
- the application URL
- Throws:
ExecutionException- if initializing the application fails
-
shutdownApplication
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:
builderor 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:
builderor 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:
builderor 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
-