Package org.codehaus.activemq.filter

Examples of org.codehaus.activemq.filter.Filter


     * @param info
     * @return the Fitler
     * @throws javax.jms.JMSException
     */
    protected Filter createFilter(ConsumerInfo info) throws JMSException {
        Filter filter = filterFactory.createFilter(info.getDestination(), info.getSelector());
        if (info.isNoLocal()) {
            filter = new AndFilter(filter, new NoLocalFilter(info.getClientId()));
        }
        return filter;
    }
View Full Code Here


        for (int i = 0; i < values.length; i++) {
            String value = values[i];
            System.out.println("Parsing: " + value);

            Filter filter = parse(value);
            assertTrue("Created ExpressionFilter filter", filter instanceof ExpressionFilter);
            Expression andExpression = ((ExpressionFilter) filter).getExpression();
            assertTrue("Created LogicExpression expression", andExpression instanceof LogicExpression);
            LogicExpression logicExpression = (LogicExpression) andExpression;
            Expression left = logicExpression.getLeft();
View Full Code Here

    }


    protected void assertInvalidSelector(Message message, String text) throws JMSException {
        try {
            Filter selector = new SelectorParser().parse(text);
            fail("Created a valid selector");
        }
        catch (InvalidSelectorException e) {
        }
    }
View Full Code Here

        catch (InvalidSelectorException e) {
        }
    }

    protected void assertSelector(Message message, String text, boolean expected) throws JMSException {
        Filter selector = new SelectorParser().parse(text);
        assertTrue("Created a valid selector", selector != null);

        boolean value = selector.matches(message);

        assertEquals("Selector for: " + text, expected, value);
    }
View Full Code Here

     * @param info
     * @return the Fitler
     * @throws javax.jms.JMSException
     */
    protected Filter createFilter(ConsumerInfo info) throws JMSException {
        Filter filter = filterFactory.createFilter(info.getDestination(), info.getSelector());
        if (info.isNoLocal()) {
            filter = new AndFilter(filter, new NoLocalFilter(info.getClientId()));
        }
        return filter;
    }
View Full Code Here

TOP

Related Classes of org.codehaus.activemq.filter.Filter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.