Class SimpMessageTypeMatcher

java.lang.Object
org.springframework.security.messaging.util.matcher.SimpMessageTypeMatcher
All Implemented Interfaces:
MessageMatcher<Object>

public class SimpMessageTypeMatcher extends Object implements MessageMatcher<Object>
A MessageMatcher that matches if the provided Message has a type that is the same as the SimpMessageType that was specified in the constructor.
Since:
4.0
  • Constructor Details

    • SimpMessageTypeMatcher

      public SimpMessageTypeMatcher(org.springframework.messaging.simp.SimpMessageType typeToMatch)
      Creates a new instance
      Parameters:
      typeToMatch - the SimpMessageType that will result in a match. Cannot be null.
  • Method Details

    • matches

      public boolean matches(org.springframework.messaging.Message<?> message)
      Description copied from interface: MessageMatcher
      Returns true if the Message matches, else false
      Specified by:
      matches in interface MessageMatcher<Object>
      Parameters:
      message - the Message to match on
      Returns:
      true if the Message matches, else false
    • equals

      public boolean equals(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