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:ResultHandlerStrategy
Returns the sync result consumer.- Specified by:
getSyncResultConsumer
in interfaceResultHandlerStrategy
- Returns:
- the invocation result consumer.
-
getSyncErrorConsumer
Description copied from interface:ResultHandlerStrategy
Returns the sync error consumer.- Specified by:
getSyncErrorConsumer
in interfaceResultHandlerStrategy
- Returns:
- the sync error consumer.
-
getAsyncInvocationResultConsumers
Description copied from interface:ResultHandlerStrategy
Returns the async invocation result consumers.- Specified by:
getAsyncInvocationResultConsumers
in interfaceResultHandlerStrategy
- Returns:
- the result consumers.
-
getAsyncInvocationErrorConsumer
Description copied from interface:ResultHandlerStrategy
Gets the async invocation error consumers.- Specified by:
getAsyncInvocationErrorConsumer
in interfaceResultHandlerStrategy
- Returns:
- the async error invocation consumers.
-
onError
Description copied from interface:ResultHandlerStrategy
Handles the final error result.- Specified by:
onError
in interfaceResultHandlerStrategy
- Returns:
- a
Subscription
-
onFinalResult
Description copied from interface:ResultHandlerStrategy
Handles the final result.- Specified by:
onFinalResult
in interfaceResultHandlerStrategy
- Returns:
- a
Subscription
-