Package org.mule.routing.filters

Examples of org.mule.routing.filters.ExpressionFilter


            expr = parser.parseUriTokens(ctx.getIBeanConfig().getPropertyParams(), expr);
        }

        if(ctx.getMethod().getReturnType().equals(Boolean.class))
        {
            return new ExpressionFilter(expr).accept(((MuleResponseMessage)message).getMessage());
        }
        return parser.evaluate(expr, message);
    }
View Full Code Here


        this.router = router;
    }

    public OutRouteBuilder when(String expression)
    {
        ExpressionFilter filter = new ExpressionFilter(expression);
        //filter.setMuleContext(mule);
        WhenDefinition wd = new WhenDefinition(router);

        return null;
    }
View Full Code Here

            }
        }

        if (failureExpression != null)
        {
            failureExpressionFilter = new ExpressionFilter(failureExpression);
        }
        else
        {
            failureExpressionFilter = new ExpressionFilter("exception-type:");
        }
        failureExpressionFilter.setMuleContext(muleContext);

        if ((ackExpression != null) && (!muleContext.getExpressionManager().isExpression(ackExpression)))
        {
View Full Code Here

        this.router = router;
    }

    public OutRouteBuilder when(String expression)
    {
        ExpressionFilter filter = new ExpressionFilter(expression);
        //filter.setMuleContext(mule);
        WhenDefinition wd = new WhenDefinition(router);

        return null;
    }
View Full Code Here

    {
        super(muleContext);
        this.muleContext = muleContext;
        if (failureExpression != null)
        {
            failureExpressionFilter = new ExpressionFilter(failureExpression);
        }
        else
        {
            failureExpressionFilter = new ExpressionFilter("exception-type:");
        }
        failureExpressionFilter.setMuleContext(muleContext);
    }
View Full Code Here

        InboundEndpoint ep = eb.buildInboundEndpoint();

        assertNotNull(ep.getFilter());
        assertTrue(ep.getFilter() instanceof ExpressionFilter);
        ExpressionFilter filter = (ExpressionFilter) ep.getFilter();
        assertEquals("payload-type", filter.getEvaluator());
        assertEquals("java.lang.String", filter.getExpression());
        assertNull(filter.getCustomEvaluator());
        assertFalse(filter.isNullReturnsTrue());
    }
View Full Code Here

        InboundEndpoint ep = eb.buildInboundEndpoint();

        assertNotNull(ep.getFilter());
        assertTrue(ep.getFilter() instanceof ExpressionFilter);
        ExpressionFilter filter = (ExpressionFilter) ep.getFilter();
        assertEquals("header", filter.getEvaluator());
        assertEquals("foo=bar", filter.getExpression());
        assertNull(filter.getCustomEvaluator());
        assertTrue(filter.isNullReturnsTrue());
    }
View Full Code Here

        InboundEndpoint ep = eb.buildInboundEndpoint();

        assertNotNull(ep.getFilter());
        assertTrue(ep.getFilter() instanceof ExpressionFilter);
        ExpressionFilter filter = (ExpressionFilter) ep.getFilter();
        assertEquals("custom", filter.getEvaluator());
        assertEquals("a.b.c", filter.getExpression());
        assertEquals("something", filter.getCustomEvaluator());
        assertFalse(filter.isNullReturnsTrue());
    }
View Full Code Here

    private void assertIsExpressionFilterWithExpressionAndEvaluator(Filter filter, String expression, String evaluator)
    {
        assertTrue(filter instanceof ExpressionFilter);

        ExpressionFilter expressionFilter = (ExpressionFilter) filter;
        assertEquals(expression, expressionFilter.getExpression());
        assertEquals(evaluator, expressionFilter.getEvaluator());
    }
View Full Code Here

        }

        if (errorFilter == null)
        {
            // We'll set a default filter that checks the return code
            errorFilter = new ExpressionFilter("#[header:INBOUND:http.status!=200]");
            logger.info("Setting default error filter to ExpressionFilter('#[header:INBOUND:http.status!=200]')");
        }
    }
View Full Code Here

TOP

Related Classes of org.mule.routing.filters.ExpressionFilter

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.