Class AbstractMessageCondition<T extends AbstractMessageCondition<T>>

java.lang.Object
org.springframework.messaging.handler.AbstractMessageCondition<T>
Type Parameters:
T - the kind of condition that this condition can be combined with or compared to
All Implemented Interfaces:
MessageCondition<T>
Direct Known Subclasses:
DestinationPatternsMessageCondition, RSocketFrameTypeMessageCondition, SimpMessageTypeMessageCondition

public abstract class AbstractMessageCondition<T extends AbstractMessageCondition<T>> extends Object implements MessageCondition<T>
Base class for MessageCondition's that pre-declares abstract methods getContent() and getToStringInfix() in order to provide implementations of equals(Object), hashCode(), and toString().
Since:
4.0
Author:
Rossen Stoyanchev
  • Constructor Details

    • AbstractMessageCondition

      public AbstractMessageCondition()
  • Method Details

    • equals

      public boolean equals(@Nullable Object other)
      Overrides:
      equals in class Object
    • hashCode

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

      public String toString()
      Overrides:
      toString in class Object
    • getContent

      protected abstract Collection<?> getContent()
      Return the collection of objects the message condition is composed of (for example, destination patterns), never null.
    • getToStringInfix

      protected abstract String getToStringInfix()
      The notation to use when printing discrete items of content. For example " || " for URL patterns or " && " for param expressions.