Package net.engio.mbassy.dispatch.el
Class ElFilter
- java.lang.Object
-
- net.engio.mbassy.dispatch.el.ElFilter
-
- All Implemented Interfaces:
IMessageFilter
public class ElFilter extends java.lang.Object implements IMessageFilter
A filter that will use a expression from the handler annotation and parse it as EL. Accepts a message if the associated EL expression evaluates totrue
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classElFilter.ExpressionFactoryHolder
-
Constructor Summary
Constructors Constructor Description ElFilter()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaccepts(java.lang.Object message, SubscriptionContext context)Check whether the message matches some criteriastatic javax.el.ExpressionFactoryELFactory()private booleanevalExpression(java.lang.String expression, StandardELResolutionContext resolutionContext, SubscriptionContext context, java.lang.Object message)static booleanisELAvailable()
-
-
-
Method Detail
-
isELAvailable
public static final boolean isELAvailable()
-
ELFactory
public static final javax.el.ExpressionFactory ELFactory()
-
accepts
public boolean accepts(java.lang.Object message, SubscriptionContext context)Description copied from interface:IMessageFilterCheck whether the message matches some criteria- Specified by:
acceptsin interfaceIMessageFilter- Parameters:
message- The message to be handled by the handlercontext- The context object containing a description of the message handler and the bus environment- Returns:
- true: if the message matches the criteria and should be delivered to the handler false: otherwise
-
evalExpression
private boolean evalExpression(java.lang.String expression, StandardELResolutionContext resolutionContext, SubscriptionContext context, java.lang.Object message)
-
-