Interface DispatchHandler<D,​S,​E extends Event>

  • Type Parameters:
    D - the inbound Dispatch type
    S - the old state type
    E - the outbound Event type
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface DispatchHandler<D,​S,​E extends Event>
    Handler for the gateway Dispatch events.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      Mono<E> handle​(DispatchContext<D,​S> context)
      Operates and transforms a Dispatch event with its context, from gateway to user-friendly Events, so it may be further routed to an event dispatcher downstream.
    • Method Detail

      • handle

        Mono<E> handle​(DispatchContext<D,​S> context)
        Operates and transforms a Dispatch event with its context, from gateway to user-friendly Events, so it may be further routed to an event dispatcher downstream.

        The context allows access to underlying client resources for operations like caching.

        Parameters:
        context - the dispatch context
        Returns:
        a Flux of Events that are derived from the given dispatch context