Interface DecoratorDefinition.CompletedDecoratorDefinition<C,D extends C>

Type Parameters:
C - The declared type of the component.
D - The implementation type of the decorator.
All Superinterfaces:
DecoratorDefinition<C,D>
Enclosing interface:
DecoratorDefinition<C,D extends C>

public static non-sealed interface DecoratorDefinition.CompletedDecoratorDefinition<C,D extends C> extends DecoratorDefinition<C,D>
Defines the behavior that all implementation of DecoratorDefinition must provide.

This separation is used to hide these methods from general use, as they are solely meant for Axon internals.

  • Method Details

    • order

      int order()
      The order in which this decorator must be invoked.

      The relative order of decorators with the same order is undefined.

      Returns:
      The order in which this decorator must be invoked.
    • decorate

      Component<C> decorate(@Nonnull Component<C> delegate)
      Decorates the given delegate by returning the instance that should be used in its place.

      Generally, this is a component that delegates calls to the delegate, although decorators may choose to return a replacement altogether.

      Parameters:
      delegate - The component to decorate.
      Returns:
      The decorated component.
    • matches

      boolean matches(@Nonnull Component.Identifier<?> id)
      Indicates whether the component with given id matches the definition of this decorator.
      Parameters:
      id - The identifier of a component to possibly decorate.
      Returns:
      true if the component's identifier matches this definition, otherwise false.