public class SimpMessageTypeMessageCondition extends AbstractMessageCondition<SimpMessageTypeMessageCondition>
MessageCondition
that matches by the message type obtained via
SimpMessageHeaderAccessor.getMessageType(Map)
.Modifier and Type | Field and Description |
---|---|
static SimpMessageTypeMessageCondition |
MESSAGE |
static SimpMessageTypeMessageCondition |
SUBSCRIBE |
Constructor and Description |
---|
SimpMessageTypeMessageCondition(SimpMessageType messageType)
A constructor accepting a message type.
|
Modifier and Type | Method and Description |
---|---|
SimpMessageTypeMessageCondition |
combine(SimpMessageTypeMessageCondition other)
Define the rules for combining this condition with another.
|
int |
compareTo(SimpMessageTypeMessageCondition other,
Message<?> message)
Compare this condition to another in the context of a specific message.
|
protected Collection<?> |
getContent()
Return the collection of objects the message condition is composed of
(e.g.
|
SimpMessageTypeMessageCondition |
getMatchingCondition(Message<?> message)
Check if this condition matches the given Message and returns a
potentially new condition with content tailored to the current message.
|
SimpMessageType |
getMessageType() |
protected String |
getToStringInfix()
The notation to use when printing discrete items of content.
|
equals, hashCode, toString
public static final SimpMessageTypeMessageCondition MESSAGE
public static final SimpMessageTypeMessageCondition SUBSCRIBE
public SimpMessageTypeMessageCondition(SimpMessageType messageType)
messageType
- the message type to match messages topublic SimpMessageType getMessageType()
protected Collection<?> getContent()
AbstractMessageCondition
null
.getContent
in class AbstractMessageCondition<SimpMessageTypeMessageCondition>
protected String getToStringInfix()
AbstractMessageCondition
getToStringInfix
in class AbstractMessageCondition<SimpMessageTypeMessageCondition>
public SimpMessageTypeMessageCondition combine(SimpMessageTypeMessageCondition other)
MessageCondition
other
- the condition to combine with@Nullable public SimpMessageTypeMessageCondition getMatchingCondition(Message<?> message)
MessageCondition
null
if there is no match.public int compareTo(SimpMessageTypeMessageCondition other, Message<?> message)
MessageCondition
MessageCondition.getMatchingCondition(Message)
to ensure they have content
relevant to current message only.