Package org.apache.camel.impl

Examples of org.apache.camel.impl.ConditionSupport


                String body = exchange.getIn().getBody(String.class);
                logs.add("Breakpoint event " + event.getClass().getSimpleName() + " with body: " + body);
            }
        };

        camelCondition = new ConditionSupport() {
            public boolean matchProcess(Exchange exchange, Processor processor, ProcessorDefinition definition) {
                return body().contains("Camel").matches(exchange);
            }
        };

        mockCondition = new ConditionSupport() {
            public boolean matchProcess(Exchange exchange, Processor processor, ProcessorDefinition definition) {
                // match when sending to mocks
                if (definition instanceof ToDefinition) {
                    ToDefinition to = (ToDefinition) definition;
                    return to.getUriOrRef().startsWith("mock");
                }
                return false;
            }
        };

        doneCondition = new ConditionSupport() {
            @Override
            public boolean matchEvent(Exchange exchange, EventObject event) {
                return event instanceof ExchangeCompletedEvent;
            }
        };
View Full Code Here


                Exception e = exchange.getException();
                logs.add("Breakpoint at " + definition.getShortName() + " caused by: " + e.getClass().getSimpleName() + "[" + e.getMessage() + "]");
            }
        };

        exceptionCondition = new ConditionSupport() {
            @Override
            public boolean matchProcess(Exchange exchange, Processor processor, ProcessorDefinition definition) {
                return exchange.getException() != null;
            }
        };
View Full Code Here

                String body = exchange.getIn().getBody(String.class);
                logs.add("Breakpoint event " + event.getClass().getSimpleName() + " with body: " + body);
            }
        };

        camelCondition = new ConditionSupport() {
            public boolean matchProcess(Exchange exchange, Processor processor, ProcessorDefinition<?> definition) {
                return body().contains("Camel").matches(exchange);
            }
        };

        mockCondition = new ConditionSupport() {
            public boolean matchProcess(Exchange exchange, Processor processor, ProcessorDefinition<?> definition) {
                // match when sending to mocks
                if (definition instanceof ToDefinition) {
                    ToDefinition to = (ToDefinition) definition;
                    return to.getUriOrRef().startsWith("mock");
                }
                return false;
            }
        };

        doneCondition = new ConditionSupport() {
            @Override
            public boolean matchEvent(Exchange exchange, EventObject event) {
                return event instanceof ExchangeCompletedEvent;
            }
        };
View Full Code Here

                Exception e = exchange.getException();
                logs.add("Breakpoint at " + definition.getShortName() + " caused by: " + e.getClass().getSimpleName() + "[" + e.getMessage() + "]");
            }
        };

        exceptionCondition = new ConditionSupport() {
            @Override
            public boolean matchProcess(Exchange exchange, Processor processor, ProcessorDefinition<?> definition) {
                return exchange.getException() != null;
            }
        };
View Full Code Here

                String body = exchange.getIn().getBody(String.class);
                logs.add("Single stepping at " + definition.getLabel() + " with body: " + body);
            }
        };

        beerCondition = new ConditionSupport() {
            public boolean matchProcess(Exchange exchange, Processor processor, ProcessorDefinition<?> definition) {
                return "beer".equals(exchange.getFromRouteId());
            }
        };
    }
View Full Code Here

                Exception e = aee.getExchange().getException();
                logs.add("Breakpoint at " + definition + " caused by: " + e.getClass().getSimpleName() + "[" + e.getMessage() + "]");
            }
        };

        exceptionCondition = new ConditionSupport() {
            public boolean matchEvent(Exchange exchange, EventObject event) {
                return event instanceof ExchangeFailedEvent;
            }
        };
    }
View Full Code Here

                Exception e = aee.getExchange().getException();
                logs.add("Breakpoint at " + definition + " caused by: " + e.getClass().getSimpleName() + "[" + e.getMessage() + "]");
            }
        };

        exceptionCondition = new ConditionSupport() {
            public boolean matchEvent(Exchange exchange, EventObject event) {
                return event instanceof ExchangeFailedEvent;
            }
        };
    }
View Full Code Here

                String body = exchange.getIn().getBody(String.class);
                logs.add("Breakpoint event " + event.getClass().getSimpleName() + " with body: " + body);
            }
        };

        camelCondition = new ConditionSupport() {
            public boolean matchProcess(Exchange exchange, Processor processor, ProcessorDefinition definition) {
                return body().contains("Camel").matches(exchange);
            }
        };

        mockCondition = new ConditionSupport() {
            public boolean matchProcess(Exchange exchange, Processor processor, ProcessorDefinition definition) {
                // match when sending to mocks
                if (definition instanceof ToDefinition) {
                    ToDefinition to = (ToDefinition) definition;
                    return to.getUriOrRef().startsWith("mock");
                }
                return false;
            }
        };

        doneCondition = new ConditionSupport() {
            @Override
            public boolean matchEvent(Exchange exchange, EventObject event) {
                return event instanceof ExchangeCompletedEvent;
            }
        };
View Full Code Here

                Exception e = exchange.getException();
                logs.add("Breakpoint at " + definition.getShortName() + " caused by: " + e.getClass().getSimpleName() + "[" + e.getMessage() + "]");
            }
        };

        exceptionCondition = new ConditionSupport() {
            @Override
            public boolean matchProcess(Exchange exchange, Processor processor, ProcessorDefinition definition) {
                return exchange.getException() != null;
            }
        };
View Full Code Here

                String body = exchange.getIn().getBody(String.class);
                logs.add("Single stepping at " + definition.getLabel() + " with body: " + body);
            }
        };

        beerCondition = new ConditionSupport() {
            public boolean matchProcess(Exchange exchange, Processor processor, ProcessorDefinition definition) {
                return "beer".equals(exchange.getFromRouteId());
            }
        };
    }
View Full Code Here

TOP

Related Classes of org.apache.camel.impl.ConditionSupport

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.