Interface MessageCondition<T>
- Type Parameters:
- T- the kind of condition that this condition can be combined with or compared to
- All Known Implementing Classes:
- AbstractMessageCondition, CompositeMessageCondition, DestinationPatternsMessageCondition, RSocketFrameTypeMessageCondition, SimpMessageMappingInfo, SimpMessageTypeMessageCondition
public interface MessageCondition<T>
Contract for mapping conditions to messages.
Message conditions can be combined (for example, type + method-level conditions), matched to a specific Message, as well as compared to each other in the context of a Message to determine which one matches a request more closely.
- Since:
- 4.0
- Author:
- Rossen Stoyanchev
- 
Method SummaryModifier and TypeMethodDescriptionDefine the rules for combining this condition with another.intCompare this condition to another in the context of a specific message.getMatchingCondition(Message<?> message) Check if this condition matches the given Message and returns a potentially new condition with content tailored to the current message.
- 
Method Details- 
combine
- 
getMatchingConditionCheck 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.- Returns:
- a condition instance in case of a match; or nullif there is no match.
 
- 
compareToCompare this condition to another in the context of a specific message. It is assumed both instances have been obtained viagetMatchingCondition(Message)to ensure they have content relevant to current message only.
 
-