org.springframework.messaging.simp

## Class SimpMessageMappingInfo

- java.lang.Object
- - org.springframework.messaging.simp.SimpMessageMappingInfo

- All Implemented Interfaces:
    MessageCondition<SimpMessageMappingInfo>

      public class SimpMessageMappingInfo
      extends Object
      implements MessageCondition<SimpMessageMappingInfo>

  Encapsulates the following request mapping conditions:
  1. `SimpMessageTypeMessageCondition`
  2. `DestinationPatternsMessageCondition`
  Since:
    4.0
  Author:
    Rossen Stoyanchev

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SimpMessageMappingInfo(SimpMessageTypeMessageCondition messageTypeMessageCondition, DestinationPatternsMessageCondition destinationConditions)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `SimpMessageMappingInfo` | `combine(SimpMessageMappingInfo other)` Define the rules for combining this condition with another.
    `int` | `compareTo(SimpMessageMappingInfo other, Message<?> message)` Compare this condition to another in the context of a specific message.
    `boolean` | `equals(Object obj)`
    `DestinationPatternsMessageCondition` | `getDestinationConditions()`
    `SimpMessageMappingInfo` | `getMatchingCondition(Message<?> message)` Check if this condition matches the given Message and returns a potentially new condition with content tailored to the current message.
    `SimpMessageTypeMessageCondition` | `getMessageTypeMessageCondition()`
    `int` | `hashCode()`
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### SimpMessageMappingInfo

          public SimpMessageMappingInfo(SimpMessageTypeMessageCondition messageTypeMessageCondition,
                                        DestinationPatternsMessageCondition destinationConditions)

  - ### Method Detail

    - #### getMessageTypeMessageCondition

          public SimpMessageTypeMessageCondition getMessageTypeMessageCondition()

    - #### getDestinationConditions

          public DestinationPatternsMessageCondition getDestinationConditions()

    - #### combine

          public SimpMessageMappingInfo combine(SimpMessageMappingInfo other)

      Description copied from interface: `MessageCondition`
      Define the rules for combining this condition with another. For example combining type- and method-level conditions.
      Specified by:
        `combine` in interface `MessageCondition<SimpMessageMappingInfo>`
      Parameters:
        `other` - the condition to combine with
      Returns:
        the resulting message condition

    - #### getMatchingCondition

          public SimpMessageMappingInfo getMatchingCondition(Message<?> message)

      Description copied from interface: `MessageCondition`
      Check if this condition matches the given Message and returns a potentially new condition with content tailored to the current message. For example a condition with destination patterns might return a new condition with sorted, matching patterns only.
      Specified by:
        `getMatchingCondition` in interface `MessageCondition<SimpMessageMappingInfo>`
      Returns:
        a condition instance in case of a match; or `null` if there is no match.

    - #### compareTo

          public int compareTo(SimpMessageMappingInfo other,
                               Message<?> message)

      Description copied from interface: `MessageCondition`
      Compare this condition to another in the context of a specific message. It is assumed both instances have been obtained via `MessageCondition.getMatchingCondition(Message)` to ensure they have content relevant to current message only.
      Specified by:
        `compareTo` in interface `MessageCondition<SimpMessageMappingInfo>`

    - #### equals

          public boolean equals(Object obj)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`