Class DiscoveryClient
java.lang.Object
org.eclipse.milo.opcua.sdk.client.DiscoveryClient
-
Constructor Summary
ConstructorsConstructorDescriptionDiscoveryClient(org.eclipse.milo.opcua.stack.core.types.structured.EndpointDescription endpoint, org.eclipse.milo.opcua.stack.transport.client.OpcClientTransport transport) -
Method Summary
Modifier and TypeMethodDescriptionconnect()static CompletableFuture<List<org.eclipse.milo.opcua.stack.core.types.structured.ApplicationDescription>>findServers(String endpointUrl) Query the FindServers service at theendpointUrl.CompletableFuture<org.eclipse.milo.opcua.stack.core.types.structured.FindServersResponse>findServers(String endpointUrl, String[] localeIds, String[] serverUris) Query the FindServers service at theendpointUrl.static CompletableFuture<List<org.eclipse.milo.opcua.stack.core.types.structured.ApplicationDescription>>findServers(String endpointUrl, Consumer<org.eclipse.milo.opcua.stack.transport.client.tcp.OpcTcpClientTransportConfigBuilder> customizer) Query the FindServers service at theendpointUrl.static CompletableFuture<List<org.eclipse.milo.opcua.stack.core.types.structured.EndpointDescription>>getEndpoints(String endpointUrl) Query the GetEndpoints service atendpointUrl.CompletableFuture<org.eclipse.milo.opcua.stack.core.types.structured.GetEndpointsResponse>getEndpoints(String endpointUrl, String[] localeIds, String[] profileUris) Query the GetEndpoints service atendpointUrl.static CompletableFuture<List<org.eclipse.milo.opcua.stack.core.types.structured.EndpointDescription>>getEndpoints(String endpointUrl, Consumer<org.eclipse.milo.opcua.stack.transport.client.tcp.OpcTcpClientTransportConfigBuilder> customizer) Query the GetEndpoints service atendpointUrl.org.eclipse.milo.opcua.stack.core.types.structured.RequestHeadernewRequestHeader(org.eclipse.milo.opcua.stack.core.types.builtin.NodeId authToken, org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger requestTimeout) CompletableFuture<org.eclipse.milo.opcua.stack.core.types.structured.RegisterServerResponse>registerServer(org.eclipse.milo.opcua.stack.core.types.structured.RegisteredServer server) Call the RegisterServer service to registerserver.
-
Constructor Details
-
DiscoveryClient
public DiscoveryClient(org.eclipse.milo.opcua.stack.core.types.structured.EndpointDescription endpoint, org.eclipse.milo.opcua.stack.transport.client.OpcClientTransport transport)
-
-
Method Details
-
connect
- Throws:
org.eclipse.milo.opcua.stack.core.UaException
-
connectAsync
-
disconnect
- Throws:
org.eclipse.milo.opcua.stack.core.UaException
-
disconnectAsync
-
findServers
public CompletableFuture<org.eclipse.milo.opcua.stack.core.types.structured.FindServersResponse> findServers(String endpointUrl, String[] localeIds, String[] serverUris) Query the FindServers service at theendpointUrl.The endpoint URL(s) for each server
ApplicationDescriptionin the response can then be used in agetEndpoints(String)call to discover the endpoints for that server.- Parameters:
endpointUrl- the endpoint URL to find servers at.localeIds- list of locales to use. The server should return the applicationName in the ApplicationDescription using one of locales specified. If the server supports more than one of the requested locales then the server shall use the locale that appears first in this list. If the server does not support any of the requested locales it chooses an appropriate default locale. The server chooses an appropriate default locale if this list is empty.serverUris- list of servers to return. All known servers are returned if the list is empty.- Returns:
- the
FindServersResponses returned by the FindServers service.
-
getEndpoints
public CompletableFuture<org.eclipse.milo.opcua.stack.core.types.structured.GetEndpointsResponse> getEndpoints(String endpointUrl, String[] localeIds, String[] profileUris) Query the GetEndpoints service atendpointUrl.- Parameters:
endpointUrl- the endpoint URL to get endpoints from.localeIds- list of locales to use. Specifies the locale to use when returning human-readable strings.profileUris- list of Transport Profile that the returned Endpoints shall support. All Endpoints are returned if the list is empty.- Returns:
- the
GetEndpointsResponsereturned by the GetEndpoints service.
-
registerServer
public CompletableFuture<org.eclipse.milo.opcua.stack.core.types.structured.RegisterServerResponse> registerServer(org.eclipse.milo.opcua.stack.core.types.structured.RegisteredServer server) Call the RegisterServer service to registerserver.- Parameters:
server- theRegisteredServerto register.- Returns:
- the
RegisterServerResponsereturned by the RegisterServer service.
-
newRequestHeader
public org.eclipse.milo.opcua.stack.core.types.structured.RequestHeader newRequestHeader(org.eclipse.milo.opcua.stack.core.types.builtin.NodeId authToken, org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger requestTimeout) -
findServers
public static CompletableFuture<List<org.eclipse.milo.opcua.stack.core.types.structured.ApplicationDescription>> findServers(String endpointUrl) Query the FindServers service at theendpointUrl.The discovery URL(s) for each server
ApplicationDescriptionin the response can then be used in agetEndpoints(String)call to discover the endpoints for that server.- Parameters:
endpointUrl- the endpoint URL to find servers at.- Returns:
- a List of
ApplicationDescriptions returned by the FindServers service.
-
findServers
public static CompletableFuture<List<org.eclipse.milo.opcua.stack.core.types.structured.ApplicationDescription>> findServers(String endpointUrl, Consumer<org.eclipse.milo.opcua.stack.transport.client.tcp.OpcTcpClientTransportConfigBuilder> customizer) Query the FindServers service at theendpointUrl.The discovery URL(s) for each server
ApplicationDescriptionin the response can then be used in agetEndpoints(String)call to discover the endpoints for that server.- Parameters:
endpointUrl- the endpoint URL to find servers at.customizer- aConsumerthat accepts aOpcTcpClientTransportConfigBuilderfor customization.- Returns:
- a List of
ApplicationDescriptions returned by the FindServers service.
-
getEndpoints
public static CompletableFuture<List<org.eclipse.milo.opcua.stack.core.types.structured.EndpointDescription>> getEndpoints(String endpointUrl) Query the GetEndpoints service atendpointUrl.- Parameters:
endpointUrl- the endpoint URL to get endpoints from.- Returns:
- a List of
EndpointDescriptions returned by the GetEndpoints service.
-
getEndpoints
public static CompletableFuture<List<org.eclipse.milo.opcua.stack.core.types.structured.EndpointDescription>> getEndpoints(String endpointUrl, Consumer<org.eclipse.milo.opcua.stack.transport.client.tcp.OpcTcpClientTransportConfigBuilder> customizer) Query the GetEndpoints service atendpointUrl.- Parameters:
endpointUrl- the endpoint URL to get endpoints from.customizer- aConsumerthat accepts aOpcTcpClientTransportConfigBuilderfor customization.- Returns:
- a List of
EndpointDescriptions returned by the GetEndpoints service.
-