Search in sources :

Example 1 with GetEndpointsResponse

use of org.eclipse.milo.opcua.stack.core.types.structured.GetEndpointsResponse in project milo by eclipse.

the class DiscoveryClient method getEndpoints.

/**
 * Query the GetEndpoints service at {@code endpointUrl}.
 *
 * @param endpointUrl the endpoint URL to get endpoints from.
 * @param localeIds   list of locales to use. Specifies the locale to use when returning human-readable strings.
 * @param profileUris list of Transport Profile that the returned Endpoints shall support. All Endpoints are
 *                    returned if the list is empty.
 * @return the {@link GetEndpointsResponse} returned by the GetEndpoints service.
 */
public CompletableFuture<GetEndpointsResponse> getEndpoints(String endpointUrl, String[] localeIds, String[] profileUris) {
    RequestHeader header = stackClient.newRequestHeader(NodeId.NULL_VALUE, stackClient.getConfig().getRequestTimeout());
    GetEndpointsRequest request = new GetEndpointsRequest(header, endpointUrl, localeIds, profileUris);
    return stackClient.sendRequest(request).thenApply(GetEndpointsResponse.class::cast);
}
Also used : GetEndpointsResponse(org.eclipse.milo.opcua.stack.core.types.structured.GetEndpointsResponse) RequestHeader(org.eclipse.milo.opcua.stack.core.types.structured.RequestHeader) GetEndpointsRequest(org.eclipse.milo.opcua.stack.core.types.structured.GetEndpointsRequest)

Aggregations

GetEndpointsRequest (org.eclipse.milo.opcua.stack.core.types.structured.GetEndpointsRequest)1 GetEndpointsResponse (org.eclipse.milo.opcua.stack.core.types.structured.GetEndpointsResponse)1 RequestHeader (org.eclipse.milo.opcua.stack.core.types.structured.RequestHeader)1