| Modifier and Type | Class and Description |
|---|---|
static class |
ServiceHandler.Builder
Builder for operation start details.
|
| Modifier and Type | Method and Description |
|---|---|
void |
cancelOperation(OperationContext context,
OperationCancelDetails details)
Cancel the asynchronously started operation.
|
OperationInfo |
fetchOperationInfo(OperationContext context,
OperationFetchInfoDetails details)
Fetch information about the asynchronously started operation.
|
HandlerResultContent |
fetchOperationResult(OperationContext context,
OperationFetchResultDetails details)
Fetch the result for an asynchronously started operation.
|
java.util.Map<java.lang.String,ServiceImplInstance> |
getInstances()
Instances, by service name.
|
java.util.List<OperationMiddleware> |
getOperationMiddlewares() |
Serializer |
getSerializer()
Serializer used for input/output.
|
static ServiceHandler.Builder |
newBuilder()
Create a builder for a service handler.
|
static ServiceHandler.Builder |
newBuilder(ServiceHandler handler)
Create a builder for service handler from an existing service handler.
|
OperationStartResult<HandlerResultContent> |
startOperation(OperationContext context,
OperationStartDetails details,
HandlerInputContent input)
Handle the start of an operation.
|
public static ServiceHandler.Builder newBuilder()
public static ServiceHandler.Builder newBuilder(ServiceHandler handler)
public java.util.Map<java.lang.String,ServiceImplInstance> getInstances()
public Serializer getSerializer()
public java.util.List<OperationMiddleware> getOperationMiddlewares()
public OperationStartResult<HandlerResultContent> startOperation(OperationContext context, OperationStartDetails details, HandlerInputContent input) throws OperationException
HandlerOperationHandler.start(io.nexusrpc.handler.OperationContext, io.nexusrpc.handler.OperationStartDetails, T) for operation details.
The implementation here should not close the input stream, that will be done by the caller.
If the result is an output stream, it will be closed later by the caller.
startOperation in interface HandlerOperationExceptionpublic HandlerResultContent fetchOperationResult(OperationContext context, OperationFetchResultDetails details) throws OperationStillRunningException, OperationException
HandlerOperationHandler.fetchResult(io.nexusrpc.handler.OperationContext, io.nexusrpc.handler.OperationFetchResultDetails) for operation details.
If the result is an output stream, it will be closed later by the caller.
fetchOperationResult in interface HandlerOperationStillRunningExceptionOperationExceptionpublic OperationInfo fetchOperationInfo(OperationContext context, OperationFetchInfoDetails details)
HandlerOperationHandler.fetchInfo(io.nexusrpc.handler.OperationContext, io.nexusrpc.handler.OperationFetchInfoDetails) for details.fetchOperationInfo in interface Handlerpublic void cancelOperation(OperationContext context, OperationCancelDetails details)
HandlerOperationHandler.cancel(io.nexusrpc.handler.OperationContext, io.nexusrpc.handler.OperationCancelDetails) for details.cancelOperation in interface Handler