org.apache.activemq.filter
Class BooleanFunctionCallExpr
java.lang.Object
org.apache.activemq.filter.FunctionCallExpression
org.apache.activemq.filter.BooleanFunctionCallExpr
- All Implemented Interfaces:
- BooleanExpression, Expression
public class BooleanFunctionCallExpr
- extends FunctionCallExpression
- implements BooleanExpression
Function call expression that evaluates to a boolean value. Selector parsing requires BooleanExpression objects for
Boolean expressions, such as operands to AND, and as the final result of a selector. This provides that interface
for function call expressions that resolve to Boolean values.
If a function can return different types at evaluation-time, the function implementation needs to decide whether it
supports casting to Boolean at parse-time.
- See Also:
FunctionCallExpression.createFunctionCall(java.lang.String, java.util.List)
|
Method Summary |
boolean |
matches(MessageEvaluationContext message_ctx)
Evaluate the function call expression, in the given context, and return an indication of whether the
expression "matches" (i.e. evaluates to true). |
BooleanFunctionCallExpr
public BooleanFunctionCallExpr(String func_name,
List<Expression> args)
throws FunctionCallExpression.invalidFunctionExpressionException
- Constructs a function call expression with the named filter function and arguments, which returns a boolean
result.
- Parameters:
func_name - - Name of the filter function to be called when evaluated.args - - List of argument expressions passed to the function.
- Throws:
FunctionCallExpression.invalidFunctionExpressionException
matches
public boolean matches(MessageEvaluationContext message_ctx)
throws javax.jms.JMSException
- Evaluate the function call expression, in the given context, and return an indication of whether the
expression "matches" (i.e. evaluates to true).
- Specified by:
matches in interface BooleanExpression
- Parameters:
message_ctx - - message context against which the expression will be evaluated.
- Returns:
- the boolean evaluation of the function call expression.
- Throws:
javax.jms.JMSException
Copyright © 2005-2013 The Apache Software Foundation. All Rights Reserved.