Here are the examples of the java api class org.apache.activemq.filter.MessageEvaluationContext taken from open source projects.
1. UnknownHandlingSelectorTest#assertSelector()
Project: activemq-artemis
File: UnknownHandlingSelectorTest.java
File: UnknownHandlingSelectorTest.java
protected void assertSelector(String text, boolean matches) throws JMSException { BooleanExpression selector = SelectorParser.parse(text); assertTrue("Created a valid selector", selector != null); MessageEvaluationContext context = new MessageEvaluationContext(); context.setMessageReference((org.apache.activemq.command.Message) message); boolean value = selector.matches(context); assertEquals("Selector for: " + text, matches, value); }
2. SelectorTest#assertSelector()
Project: activemq-artemis
File: SelectorTest.java
File: SelectorTest.java
protected void assertSelector(Message message, String text, boolean expected) throws JMSException { BooleanExpression selector = SelectorParser.parse(text); assertTrue("Created a valid selector", selector != null); MessageEvaluationContext context = new MessageEvaluationContext(); context.setMessageReference((org.apache.activemq.command.Message) message); boolean value = selector.matches(context); assertEquals("Selector for: " + text, expected, value); }