public class AsyncOperationContext<R> extends Object
| Constructor and Description |
|---|
AsyncOperationContext(OpcUaServer server) |
| Modifier and Type | Method and Description |
|---|---|
void |
failure(long statusCode)
Fail this operation with
statusCode. |
void |
failure(StatusCode statusCode)
Fail this operation with
statusCode. |
void |
failure(UaException failure)
Fail this operation with
failure. |
CompletableFuture<R> |
getFuture()
Get the
CompletableFuture backing this operation. |
OpcUaServer |
getServer()
Get the
OpcUaServer instance this operation is taking place in. |
void |
success(R result)
Complete this operation successfully with
result. |
public AsyncOperationContext(OpcUaServer server)
public OpcUaServer getServer()
OpcUaServer instance this operation is taking place in.OpcUaServer instance this operation is taking place in.public CompletableFuture<R> getFuture()
CompletableFuture backing this operation.
Do not use this future to complete the operation; use success(Object)} or failure(UaException)
overrides instead.
CompletableFuture backing this operation.public void success(R result)
result.result - the operation result.public void failure(UaException failure)
failure.failure - a UaException representing the failure.public void failure(StatusCode statusCode)
statusCode.statusCode - the StatusCode representing the failure.public void failure(long statusCode)
statusCode.statusCode - the status code representing the failure.Copyright © 2021. All rights reserved.