Class ContentFilter

java.lang.Object
dev.agenor.runtime.filter.ContentFilter
All Implemented Interfaces:
MessageFilter, Predicate<Message>

public class ContentFilter extends Object implements MessageFilter
Filter messages by content
  • Method Details

    • test

      public boolean test(Message message)
      Description copied from interface: MessageFilter
      Test if the message matches this filter
      Specified by:
      test in interface MessageFilter
      Specified by:
      test in interface Predicate<Message>
      Parameters:
      message - the message to test
      Returns:
      true if the message matches the filter criteria
    • ofType

      public static ContentFilter ofType(Class<?> type)
      Content must be of specific type
    • matching

      public static ContentFilter matching(Predicate<Object> predicate)
      Content must satisfy predicate
    • notNull

      public static ContentFilter notNull()
      Content must be non-null