Class ElFilter

java.lang.Object
net.engio.mbassy.dispatch.el.ElFilter
All Implemented Interfaces:
IMessageFilter

public class ElFilter extends 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 to true

  • Constructor Details

    • ElFilter

      public ElFilter()
  • Method Details

    • isELAvailable

      public static final boolean isELAvailable()
    • ELFactory

      public static final javax.el.ExpressionFactory ELFactory()
    • accepts

      public boolean accepts(Object message, SubscriptionContext context)
      Description copied from interface: IMessageFilter
      Check whether the message matches some criteria
      Specified by:
      accepts in interface IMessageFilter
      Parameters:
      message - The message to be handled by the handler
      context - 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(String expression, StandardELResolutionContext resolutionContext, SubscriptionContext context, Object message)