Package dev.getelements.elements.rt.jrpc
Class SingleAsyncResultHandlerStrategy
java.lang.Object
dev.getelements.elements.rt.jrpc.SingleAsyncResultHandlerStrategy
- All Implemented Interfaces:
ResultHandlerStrategy
Represents a single async style RPC method. This supports a single return type, either asynchronous or synchronous.
This is useful for JSON-RPC where the response document tends to be a single object, rather than a series of
responses sent during the invocation process.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the async invocation error consumers.Returns the async invocation result consumers.Returns the sync error consumer.Returns the sync result consumer.Handles the final error result.onFinalResult(Consumer<Object> finalResult) Handles the final result.
-
Constructor Details
-
SingleAsyncResultHandlerStrategy
public SingleAsyncResultHandlerStrategy()
-
-
Method Details
-
getSyncResultConsumer
Description copied from interface:ResultHandlerStrategyReturns the sync result consumer.- Specified by:
getSyncResultConsumerin interfaceResultHandlerStrategy- Returns:
- the invocation result consumer.
-
getSyncErrorConsumer
Description copied from interface:ResultHandlerStrategyReturns the sync error consumer.- Specified by:
getSyncErrorConsumerin interfaceResultHandlerStrategy- Returns:
- the sync error consumer.
-
getAsyncInvocationResultConsumers
Description copied from interface:ResultHandlerStrategyReturns the async invocation result consumers.- Specified by:
getAsyncInvocationResultConsumersin interfaceResultHandlerStrategy- Returns:
- the result consumers.
-
getAsyncInvocationErrorConsumer
Description copied from interface:ResultHandlerStrategyGets the async invocation error consumers.- Specified by:
getAsyncInvocationErrorConsumerin interfaceResultHandlerStrategy- Returns:
- the async error invocation consumers.
-
onError
Description copied from interface:ResultHandlerStrategyHandles the final error result.- Specified by:
onErrorin interfaceResultHandlerStrategy- Returns:
- a
Subscription
-
onFinalResult
Description copied from interface:ResultHandlerStrategyHandles the final result.- Specified by:
onFinalResultin interfaceResultHandlerStrategy- Returns:
- a
Subscription
-