|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.activemq.filter.function.regexMatchFunction
public class regexMatchFunction
Filter function that matches a value against a regular expression.
REGEX( 'A.B', 'A-B' )
Note that the regular expression is not anchored; use the anchor characters, ^ and $, as-needed. For example, REGEX( 'AA', 'XAAX' ) evaluates to true while REGEX( '^AA$' , 'XAAX' ) evaluates to false.
| Field Summary | |
|---|---|
protected static LRUCache<String,Pattern> |
compiledExprCache
|
| Constructor Summary | |
|---|---|
regexMatchFunction()
|
|
| Method Summary | |
|---|---|
Object |
evaluate(FunctionCallExpression expr,
MessageEvaluationContext message)
Evalutate the given expression, which consists of a call to this function, in the context given. |
protected Pattern |
getCompiledPattern(String reg_ex_str)
Retrieve a compiled pattern for the given pattern string. |
boolean |
isValid(FunctionCallExpression expr)
Check whether the given expression is a valid call of this function. |
boolean |
returnsBoolean(FunctionCallExpression expr)
Indicate that this Filter Function evaluates to a Boolean result. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final LRUCache<String,Pattern> compiledExprCache
| Constructor Detail |
|---|
public regexMatchFunction()
| Method Detail |
|---|
public boolean isValid(FunctionCallExpression expr)
isValid in interface FilterFunctionexpr - - the expression consisting of a call to this function.
public boolean returnsBoolean(FunctionCallExpression expr)
returnsBoolean in interface FilterFunctionexpr - - the expression consisting of a call to this function.
public Object evaluate(FunctionCallExpression expr,
MessageEvaluationContext message)
throws javax.jms.JMSException
evaluate in interface FilterFunctionexpr - - the expression consisting of a call to this function.message_ctx - - the context in which the call is being evaluated.
javax.jms.JMSExceptionprotected Pattern getCompiledPattern(String reg_ex_str)
reg_ex_str - - the string specifying the regular expression.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||