public class OperationStartResult<R>
extends java.lang.Object
OperationHandler.start(io.nexusrpc.handler.OperationContext, io.nexusrpc.handler.OperationStartDetails, T).
This is either a synchronous result (created via sync(R)) or asynchronous operation
token (created via async(java.lang.String)).
| Modifier and Type | Class and Description |
|---|---|
static class |
OperationStartResult.Builder<R>
Builder for an OperationStartResult.
|
| Modifier and Type | Method and Description |
|---|---|
static <R> OperationStartResult<R> |
async(java.lang.String operationToken)
Create a started asynchronous operation start result with the given operation token.
|
@Nullable java.lang.String |
getAsyncOperationToken()
The asynchronous operation token.
|
R |
getSyncResult()
The synchronous result.
|
boolean |
isSync()
Whether this start result is synchronous or asynchronous.
|
static <R> OperationStartResult.Builder<R> |
newAsyncBuilder(java.lang.String operationToken)
Create a builder with an async operation token.
|
static <R> OperationStartResult.Builder<R> |
newBuilder(OperationStartResult<R> request)
Create a builder from an existing OperationStartResult.
|
static <R> OperationStartResult.Builder<R> |
newSyncBuilder(R value)
Create a builder with a synchronous result.
|
static <R> OperationStartResult<R> |
sync(R value)
Create a completed synchronous operation start result from the given value.
|
public static <R> OperationStartResult.Builder<R> newSyncBuilder(R value)
public static <R> OperationStartResult.Builder<R> newAsyncBuilder(java.lang.String operationToken)
public static <R> OperationStartResult.Builder<R> newBuilder(OperationStartResult<R> request)
public static <R> OperationStartResult<R> sync(R value)
public static <R> OperationStartResult<R> async(java.lang.String operationToken)
public boolean isSync()
public R getSyncResult()
public @Nullable java.lang.String getAsyncOperationToken()