org.apache.activemq.filter.function
Class makeListFunction

java.lang.Object
  extended by org.apache.activemq.filter.function.makeListFunction
All Implemented Interfaces:
FilterFunction

public class makeListFunction
extends Object
implements FilterFunction

Filter function that creates a list with each argument being one element in the list. For example:

MAKELIST( '1', '2', '3' )


Constructor Summary
makeListFunction()
           
 
Method Summary
 Object evaluate(FunctionCallExpression expr, MessageEvaluationContext message)
          Evalutate the given expression, which consists of a call to this function, in the context given.
 boolean isValid(FunctionCallExpression expr)
          Check whether the given expression is a valid call of this function.
 boolean returnsBoolean(FunctionCallExpression expr)
          Indicate that this function never evaluates to a Boolean result.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

makeListFunction

public makeListFunction()
Method Detail

isValid

public boolean isValid(FunctionCallExpression expr)
Check whether the given expression is a valid call of this function. Any number of arguments is accepted.

Specified by:
isValid in interface FilterFunction
Parameters:
expr - - the expression consisting of a call to this function.
Returns:
true - if the expression is valid; false - otherwise.

returnsBoolean

public boolean returnsBoolean(FunctionCallExpression expr)
Indicate that this function never evaluates to a Boolean result.

Specified by:
returnsBoolean in interface FilterFunction
Parameters:
expr - - the expression consisting of a call to this function.
Returns:
false - this Filter Function never evaluates to a Boolean.

evaluate

public Object evaluate(FunctionCallExpression expr,
                       MessageEvaluationContext message)
                throws JMSException
Evalutate the given expression, which consists of a call to this function, in the context given. Creates a list containing the evaluated results of its argument expressions.

Specified by:
evaluate in interface FilterFunction
Parameters:
expr - - the expression consisting of a call to this function.
message_ctx - - the context in which the call is being evaluated.
Returns:
java.util.List - the result of the evaluation.
Throws:
JMSException


Copyright © 2005–2013 The Apache Software Foundation. All rights reserved.