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 class
ElFilter.ExpressionFactoryHolder
-
Constructor Summary
Constructors Constructor Description ElFilter()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
accepts(java.lang.Object message, SubscriptionContext context)
Check whether the message matches some criteriastatic javax.el.ExpressionFactory
ELFactory()
private boolean
evalExpression(java.lang.String expression, StandardELResolutionContext resolutionContext, SubscriptionContext context, java.lang.Object message)
static boolean
isELAvailable()
-
-
-
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:IMessageFilter
Check whether the message matches some criteria- Specified by:
accepts
in 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)
-
-