Class SimpMessageTypeMatcher

  • All Implemented Interfaces:
    MessageMatcher<java.lang.Object>

    public class SimpMessageTypeMatcher
    extends java.lang.Object
    implements MessageMatcher<java.lang.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 Summary

      Constructors 
      Constructor Description
      SimpMessageTypeMatcher​(org.springframework.messaging.simp.SimpMessageType typeToMatch)
      Creates a new instance
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object other)  
      int hashCode()  
      boolean matches​(org.springframework.messaging.Message<?> message)
      Returns true if the Message matches, else false
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • 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 Detail

      • 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<java.lang.Object>
        Parameters:
        message - the Message to match on
        Returns:
        true if the Message matches, else false
      • equals

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object
      • hashCode

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

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object