Package dev.getelements.elements.rt
Interface ResultHandlerStrategy
- All Known Implementing Classes:
SingleAsyncResultHandlerStrategy
,SingleSyncReturnResultHandlerStrategy
public interface ResultHandlerStrategy
This defines the strategy of how JSON-RPC handles the response.
-
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.
-
Method Details
-
getSyncResultConsumer
Consumer<InvocationResult> getSyncResultConsumer()Returns the sync result consumer.- Returns:
- the invocation result consumer.
-
getSyncErrorConsumer
Consumer<InvocationError> getSyncErrorConsumer()Returns the sync error consumer.- Returns:
- the sync error consumer.
-
getAsyncInvocationResultConsumers
List<Consumer<InvocationResult>> getAsyncInvocationResultConsumers()Returns the async invocation result consumers.- Returns:
- the result consumers.
-
getAsyncInvocationErrorConsumer
Consumer<InvocationError> getAsyncInvocationErrorConsumer()Gets the async invocation error consumers.- Returns:
- the async error invocation consumers.
-
onError
Handles the final error result.- Returns:
- a
Subscription
-
onFinalResult
Handles the final result.- Returns:
- a
Subscription
-