Examples of DefaultRouteNode


Examples of org.apache.camel.impl.DefaultRouteNode

        traced.addTraced(new DefaultRouteNode(node, super.getProcessor()));
    }

    private void traceOnException(TracedRouteNodes traced, Exchange exchange) throws Exception {
        if (traced.getLastNode() != null) {
            traced.addTraced(new DefaultRouteNode(traced.getLastNode().getProcessorDefinition(), traced.getLastNode().getProcessor()));
        }
        traced.addTraced(new OnExceptionRouteNode());
        // log and trace so we have the from -> onException event as well
        logExchange(exchange);
        traceExchange(exchange);
        traced.addTraced(new DefaultRouteNode(node, super.getProcessor()));
    }
View Full Code Here

Examples of org.apache.camel.impl.DefaultRouteNode

        traced.addTraced(new DefaultRouteNode(node, super.getProcessor()));
    }

    private void traceDoCatch(TracedRouteNodes traced, Exchange exchange) throws Exception {
        if (traced.getLastNode() != null) {
            traced.addTraced(new DefaultRouteNode(traced.getLastNode().getProcessorDefinition(), traced.getLastNode().getProcessor()));
        }
        traced.addTraced(new DoCatchRouteNode());
        // log and trace so we have the from -> doCatch event as well
        logExchange(exchange);
        traceExchange(exchange);
        traced.addTraced(new DefaultRouteNode(node, super.getProcessor()));
    }
View Full Code Here

Examples of org.apache.camel.impl.DefaultRouteNode

        traced.addTraced(new DefaultRouteNode(node, super.getProcessor()));
    }

    private void traceDoFinally(TracedRouteNodes traced, Exchange exchange) throws Exception {
        if (traced.getLastNode() != null) {
            traced.addTraced(new DefaultRouteNode(traced.getLastNode().getProcessorDefinition(), traced.getLastNode().getProcessor()));
        }
        traced.addTraced(new DoFinallyRouteNode());
        // log and trace so we have the from -> doFinally event as well
        logExchange(exchange);
        traceExchange(exchange);
        traced.addTraced(new DefaultRouteNode(node, super.getProcessor()));
    }
View Full Code Here

Examples of org.apache.camel.impl.DefaultRouteNode

        traced.addTraced(new DefaultRouteNode(node, super.getProcessor()));
    }

    private void traceAggregate(TracedRouteNodes traced, Exchange exchange) {
        traced.addTraced(new AggregateRouteNode((AggregateDefinition) node.getParent()));
        traced.addTraced(new DefaultRouteNode(node, super.getProcessor()));
    }
View Full Code Here

Examples of org.apache.camel.impl.DefaultRouteNode

    protected void traceIntercept(InterceptDefinition intercept, TracedRouteNodes traced, Exchange exchange) throws Exception {
        // use the counter to get the index of the intercepted processor to be traced
        Processor last = intercept.getInterceptedProcessor(traced.getAndIncrementCounter(intercept));
        // skip doing any double tracing of interceptors, so the last must not be a TraceInterceptor instance
        if (last != null && !(last instanceof TraceInterceptor)) {
            traced.addTraced(new DefaultRouteNode(node, last));

            boolean shouldLog = shouldLogNode(node) && shouldLogExchange(exchange);
            if (shouldLog) {
                // log and trace the processor that was intercepted so we can see it
                logExchange(exchange);
View Full Code Here

Examples of org.apache.camel.impl.DefaultRouteNode

                    } else if (node instanceof OnCompletionDefinition) {
                        // special for on completion so we can see it in the trace logs
                        trace = beforeOnCompletion((OnCompletionDefinition) node, tuow, exchange);
                    } else {
                        // regular so just add it
                        tuow.addTraced(new DefaultRouteNode(node, super.getProcessor()));
                    }
                }
            }

            // log and trace the processor
View Full Code Here

Examples of org.apache.camel.impl.DefaultRouteNode

            // yes its first time then do some special to log and trace the
            // start of onException
            Expression exp = new OnExceptionExpression();
             
            // add our pesudo node
            tuow.addTraced(new DefaultRouteNode(node, exp));

            // log and trace the processor that was onException so we can see immediately
            logExchange(exchange);
            traceExchange(exchange);
        }

        // add the processor that is invoked for this onException
        tuow.addTraced(new DefaultRouteNode(node, super.getProcessor()));
        return true;
    }
View Full Code Here

Examples of org.apache.camel.impl.DefaultRouteNode

                    }
                }
                // yes its first time then do some special to log and trace the start of onCompletion
                Expression exp = new OnCompletionExpression();
                // add the onCompletion and then the processor that is invoked nest
                tuow.addTraced(new DefaultRouteNode(node, exp));
                tuow.addTraced(new DefaultRouteNode(node, super.getProcessor()));

                // log and trace so we get the onCompletion -> processor in the log
                logExchange(exchange);
                traceExchange(exchange);
            } else {
                // we are doing the onCompletion but this is after the start so just
                // add the processor and do no special start message
                tuow.addTraced(new DefaultRouteNode(node, super.getProcessor()));
            }

        }

        return answer;
View Full Code Here

Examples of org.apache.camel.impl.DefaultRouteNode

        // definition is a single object that is shared by concurrent thread being routed
        // so each exchange has its own private counter
        InterceptDefinition intercept = (InterceptDefinition) node;
        Processor last = intercept.getInterceptedProcessor(tuow.getAndIncrement(intercept));
        if (last != null) {
            tuow.addTraced(new DefaultRouteNode(node, last));

            // log and trace the processor that was intercepted so we can see it
            logExchange(exchange);
            traceExchange(exchange);
        }
View Full Code Here

Examples of org.apache.camel.impl.DefaultRouteNode

                    } else if (ProcessorDefinitionHelper.isFirstChildOfType(AggregateDefinition.class, node)) {
                        // special for aggregate
                        traceAggregate(traced, exchange);
                    } else {
                        // regular so just add it
                        traced.addTraced(new DefaultRouteNode(node, super.getProcessor()));
                    }
                } else {
                    LOG.trace("Cannot trace as this Exchange does not have an UnitOfWork: {}", exchange);
                }
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.