/** * @see org.apache.activemq.filter.Expression#evaluate(MessageEvaluationContext) */ public Object evaluate(MessageEvaluationContext message) throws JMSException { Object rv = this.getRight().evaluate(message); if (rv == null) { return null; } if (!(rv instanceof String)) { return Boolean.FALSE; // throw new RuntimeException("LIKE can only operate on String // identifiers. LIKE attemped on: '" + rv.getClass()); } return likePattern.matcher((String)rv).matches() ? Boolean.TRUE : Boolean.FALSE; }
/** * @see org.apache.activemq.filter.Expression#evaluate(MessageEvaluationContext) */ public Object evaluate(MessageEvaluationContext message) throws JMSException { Object rv = this.getRight().evaluate(message); if (rv == null) { return null; } if (!(rv instanceof String)) { return Boolean.FALSE; // throw new RuntimeException("LIKE can only operate on String // identifiers. LIKE attemped on: '" + rv.getClass()); } return likePattern.matcher((String)rv).matches() ? Boolean.TRUE : Boolean.FALSE; }
/** * @see org.apache.activemq.filter.Expression#evaluate(MessageEvaluationContext) */ public Object evaluate(MessageEvaluationContext message) throws JMSException { Object rv = this.getRight().evaluate(message); if (rv == null) { return null; } if (!(rv instanceof String)) { return Boolean.FALSE; // throw new RuntimeException("LIKE can only operate on String // identifiers. LIKE attemped on: '" + rv.getClass()); } return likePattern.matcher((String)rv).matches() ? Boolean.TRUE : Boolean.FALSE; }
/** * @see org.apache.activemq.filter.Expression#evaluate(MessageEvaluationContext) */ public Object evaluate(MessageEvaluationContext message) throws JMSException { Object rv = this.getRight().evaluate(message); if (rv == null) { return null; } if (!(rv instanceof String)) { return Boolean.FALSE; // throw new RuntimeException("LIKE can only operate on String // identifiers. LIKE attemped on: '" + rv.getClass()); } return likePattern.matcher((String)rv).matches() ? Boolean.TRUE : Boolean.FALSE; }
/** * @see org.apache.activemq.filter.Expression#evaluate(MessageEvaluationContext) */ public Object evaluate(MessageEvaluationContext message) throws JMSException { Object rv = this.getRight().evaluate(message); if (rv == null) { return null; } if (!(rv instanceof String)) { return Boolean.FALSE; // throw new RuntimeException("LIKE can only operate on String // identifiers. LIKE attemped on: '" + rv.getClass()); } return likePattern.matcher((String)rv).matches() ? Boolean.TRUE : Boolean.FALSE; }