Class ActionMapper


  • public class ActionMapper
    extends Object
    Holds mappings between concrete StoreAction types and the code to execute when they are invoked.
    • Method Detail

      • findHandlerForAction

        public <R> Optional<Function<StoreAction<R>,​? extends Publisher<R>>> findHandlerForAction​(StoreAction<R> action)
        Retrieves the handler associated to the given action based on its concrete type.
        Type Parameters:
        R - the return type of the action, to ensure type safety
        Parameters:
        action - the action to retrieve the handler for
        Returns:
        the handler for the given action, or Optional.empty() if not found.