Interface EntityCommandHandlerInterceptorChain<E>

Type Parameters:
E - the type of the entity modeled by this interface
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 EntityCommandHandlerInterceptorChain<E>
Chain allowing an EntityCommandHandlerInterceptor to proceed dispatching a CommandMessage to an entity, either to the next interceptor in the chain, or to the entity's own command handlers.

Unlike the generic MessageHandlerInterceptorChain, this chain threads the entity instance through proceed(CommandMessage, Object, ProcessingContext) rather than capturing it by closure.

Since:
5.3.2
Author:
Steven van Beelen
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    proceed(CommandMessage command, @Nullable E entity, ProcessingContext context)
    Signals this interceptor chain to continue dispatching the command.
  • Method Details

    • proceed

      MessageStream<?> proceed(CommandMessage command, @Nullable E entity, ProcessingContext context)
      Signals this interceptor chain to continue dispatching the command.
      Parameters:
      command - the command to pass down the chain
      entity - the entity instance the command targets, or null when the command is a creational command for which no entity instance exists yet
      context - the ProcessingContext the command is processed in
      Returns:
      a MessageStream containing the result of processing the given command