Package org.apache.activemq.filter
Class BooleanFunctionCallExpr
java.lang.Object
org.apache.activemq.filter.FunctionCallExpression
org.apache.activemq.filter.BooleanFunctionCallExpr
- All Implemented Interfaces:
BooleanExpression
,Expression
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.activemq.filter.FunctionCallExpression
FunctionCallExpression.functionRegistration, FunctionCallExpression.invalidFunctionExpressionException
-
Field Summary
Fields inherited from class org.apache.activemq.filter.FunctionCallExpression
arguments, filterFunc, functionName, functionRegistry
-
Constructor Summary
ConstructorsConstructorDescriptionBooleanFunctionCallExpr
(String func_name, List<Expression> args) Constructs a function call expression with the named filter function and arguments, which returns a boolean result. -
Method Summary
Modifier and TypeMethodDescriptionboolean
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).Methods inherited from class org.apache.activemq.filter.FunctionCallExpression
createFunctionCall, deregisterFunction, evaluate, getArgument, getNumArguments, registerFunction, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.activemq.filter.Expression
evaluate
-
Constructor Details
-
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
-
-
Method Details
-
matches
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 interfaceBooleanExpression
- Parameters:
message_ctx
- - message context against which the expression will be evaluated.- Returns:
- the boolean evaluation of the function call expression.
- Throws:
jakarta.jms.JMSException
-