Class AndCommandMessageFilter

java.lang.Object
org.axonframework.commandhandling.distributed.commandfilter.AndCommandMessageFilter
All Implemented Interfaces:
Serializable, CommandMessageFilter

public class AndCommandMessageFilter extends Object implements CommandMessageFilter
A CommandMessageFilter implementation that matches whenever both supplied CommandMessageFilter instances match.
Since:
4.0
Author:
Allard Buijze
See Also:
  • Constructor Details

    • AndCommandMessageFilter

      @ConstructorProperties({"first","second"}) public AndCommandMessageFilter(CommandMessageFilter first, CommandMessageFilter second)
      Initialize the filter to match when both the first and the second filter match.
      Parameters:
      first - the first filter to match
      second - the second filter to match
  • Method Details

    • matches

      public boolean matches(@Nonnull CommandMessage<?> commandMessage)
      Description copied from interface: CommandMessageFilter
      Indicates whether the given commandMessage matches this filter.
      Specified by:
      matches in interface CommandMessageFilter
      Parameters:
      commandMessage - the message to match
      Returns:
      true if the command matches, otherwise false
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object