Package org.apache.camel.builder

Examples of org.apache.camel.builder.ErrorHandlerBuilderRef


    protected RouteBuilder createRouteBuilder() throws Exception {
        return new RouteBuilder() {
            @Override
            public void configure() throws Exception {
                from("direct:start")
                    .errorHandler(new ErrorHandlerBuilderRef("myDLC"))
                    .onException(IllegalArgumentException.class)
                        .handled(true)
                        .to("mock:handled")
                    .end()
                    .to("mock:a")
View Full Code Here


                    .handled(true)
                    .to("mock:handled")
                    .end();

                from("direct:foo")
                    .errorHandler(new ErrorHandlerBuilderRef("myDLC"))
                    .to("mock:foo")
                    .throwException(new IOException("Damn IO"));

                from("direct:start")
                    .errorHandler(new ErrorHandlerBuilderRef("myDLC"))
                    .to("mock:a")
                    .throwException(new IllegalArgumentException("Damn"));
            }
        };
    }
View Full Code Here

                    .handled(true)
                    .to("mock:handled")
                    .end();

                from("direct:foo")
                    .errorHandler(new ErrorHandlerBuilderRef("myDLC"))
                    .to("mock:foo")
                    .throwException(new IOException("Damn IO"));

                from("direct:start")
                    .errorHandler(new ErrorHandlerBuilderRef("myDLC"))
                    .to("mock:a")
                    .throwException(new IllegalArgumentException("Damn"));
            }
        };
    }
View Full Code Here

    @XmlAttribute
    public void setErrorHandlerRef(String errorHandlerRef) {
        this.errorHandlerRef = errorHandlerRef;
        // we use an specific error handler ref (from Spring DSL) then wrap that
        // with a error handler build ref so Camel knows its not just the default one
        setErrorHandlerBuilder(new ErrorHandlerBuilderRef(errorHandlerRef));
    }
View Full Code Here

        this.shutdownRunningTask = shutdownRunningTask;
    }
   
    private ErrorHandlerFactory createErrorHandlerBuilder() {
        if (errorHandlerRef != null) {
            return new ErrorHandlerBuilderRef(errorHandlerRef);
        }

        // return a reference to the default error handler
        return new ErrorHandlerBuilderRef(ErrorHandlerBuilderRef.DEFAULT_ERROR_HANDLER_BUILDER);
    }
View Full Code Here

    @Override
    protected RouteBuilder createRouteBuilder() throws Exception {
        return new RouteBuilder() {
            @Override
            public void configure() throws Exception {
                errorHandler(new ErrorHandlerBuilderRef("myDLC"));

                from("direct:foo")
                    .to("mock:foo")
                    .throwException(new IllegalArgumentException("Damn Foo"));
View Full Code Here

    @Override
    protected RouteBuilder createRouteBuilder() throws Exception {
        return new RouteBuilder() {
            @Override
            public void configure() throws Exception {
                errorHandler(new ErrorHandlerBuilderRef("myDLC"));

                from("direct:start")
                    .onException(IllegalArgumentException.class)
                        .handled(true)
                        .to("mock:handled")
View Full Code Here

    @Override
    protected RouteBuilder createRouteBuilder() throws Exception {
        return new RouteBuilder() {
            @Override
            public void configure() throws Exception {
                errorHandler(new ErrorHandlerBuilderRef("myDLC"));

                from("direct:start")
                    .onException(IllegalArgumentException.class)
                        .handled(false)
                        .to("mock:handled")
View Full Code Here

    @Override
    protected RouteBuilder createRouteBuilder() throws Exception {
        return new RouteBuilder() {
            @Override
            public void configure() throws Exception {
                errorHandler(new ErrorHandlerBuilderRef("myDLC"));

                onException(IllegalArgumentException.class)
                    .handled(true)
                    .to("mock:handled")
                    .end();
View Full Code Here

    protected RouteBuilder createRouteBuilder() throws Exception {
        return new RouteBuilder() {
            @Override
            public void configure() throws Exception {
                from("direct:foo")
                    .errorHandler(new ErrorHandlerBuilderRef("myDLC"))
                    .to("mock:foo")
                    .throwException(new IllegalArgumentException("Damn Foo"));

                from("direct:start")
                    .errorHandler(new ErrorHandlerBuilderRef("myDLC"))
                    .onException(IllegalArgumentException.class)
                        .handled(true)
                        .to("mock:handled")
                    .end()
                    .to("mock:a")
View Full Code Here

TOP

Related Classes of org.apache.camel.builder.ErrorHandlerBuilderRef

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.