Package org.apache.camel.processor

Examples of org.apache.camel.processor.ThreadsProcessor


                    .rejectedPolicy(getRejectedPolicy())
                    .build();
            executorService = manager.newThreadPool(this, name, profile);
        }

        ThreadsProcessor thread = new ThreadsProcessor(routeContext.getCamelContext(), executorService);
        if (getCallerRunsWhenRejected() == null) {
            // should be true by default
            thread.setCallerRunsWhenRejected(true);
        } else {
            thread.setCallerRunsWhenRejected(getCallerRunsWhenRejected());
        }

        List<Processor> pipe = new ArrayList<Processor>(2);
        pipe.add(thread);
        pipe.add(createChildProcessor(routeContext, true));
View Full Code Here


                executorService = routeContext.getCamelContext().getExecutorServiceStrategy()
                                        .newThreadPool(this, name, poolSize, max, keepAlive, tu, maxQueue, rejected, true);
            }
        }

        ThreadsProcessor thread = new ThreadsProcessor(routeContext.getCamelContext(), executorService);
        if (getCallerRunsWhenRejected() != null) {
            thread.setCallerRunsWhenRejected(getCallerRunsWhenRejected());
        }

        List<Processor> pipe = new ArrayList<Processor>(2);
        pipe.add(thread);
        pipe.add(createChildProcessor(routeContext, true));
View Full Code Here

        Processor childProcessor = this.createChildProcessor(routeContext, true);

        // wrap it in a unit of work so the route that comes next is also done in a unit of work
        UnitOfWorkProcessor uow = new UnitOfWorkProcessor(routeContext, childProcessor);

        return new ThreadsProcessor(routeContext.getCamelContext(), uow, executorService, waitForTaskToComplete);
    }
View Full Code Here

        Processor childProcessor = routeContext.createProcessor(this);

        // wrap it in a unit of work so the route that comes next is also done in a unit of work
        UnitOfWorkProcessor uow = new UnitOfWorkProcessor(childProcessor);

        return new ThreadsProcessor(uow, executorService, waitForTaskToComplete);
    }
View Full Code Here

        Processor childProcessor = routeContext.createProcessor(this);

        // wrap it in a unit of work so the route that comes next is also done in a unit of work
        UnitOfWorkProcessor uow = new UnitOfWorkProcessor(childProcessor);

        return new ThreadsProcessor(uow, executorService, waitForTaskToComplete);
    }
View Full Code Here

                    .build();
            threadPool = manager.newThreadPool(this, name, profile);
            shutdownThreadPool = true;
        }

        ThreadsProcessor thread = new ThreadsProcessor(routeContext.getCamelContext(), threadPool, shutdownThreadPool);
        if (getCallerRunsWhenRejected() == null) {
            // should be true by default
            thread.setCallerRunsWhenRejected(true);
        } else {
            thread.setCallerRunsWhenRejected(getCallerRunsWhenRejected());
        }
        thread.setRejectedPolicy(getRejectedPolicy());

        List<Processor> pipe = new ArrayList<Processor>(2);
        pipe.add(thread);
        pipe.add(createChildProcessor(routeContext, true));
        // wrap in nested pipeline so this appears as one processor
View Full Code Here

        Processor childProcessor = routeContext.createProcessor(this);

        // wrap it in a unit of work so the route that comes next is also done in a unit of work
        UnitOfWorkProcessor uow = new UnitOfWorkProcessor(childProcessor);

        return new ThreadsProcessor(uow, executorService, waitForTaskToComplete);
    }
View Full Code Here

        Processor childProcessor = routeContext.createProcessor(this);

        // wrap it in a unit of work so the route that comes next is also done in a unit of work
        UnitOfWorkProcessor uow = new UnitOfWorkProcessor(routeContext, childProcessor);

        return new ThreadsProcessor(uow, executorService, waitForTaskToComplete);
    }
View Full Code Here

            executorService = routeContext.getCamelContext().getExecutorServiceStrategy()
                                    .newThreadPool(this, name, core, max, keepAlive, tu, maxQueue, rejected, true);
        }

        ThreadsProcessor thread = new ThreadsProcessor(routeContext.getCamelContext(), executorService);
        if (getCallerRunsWhenRejected() == null) {
            // should be true by default
            thread.setCallerRunsWhenRejected(true);
        } else {
            thread.setCallerRunsWhenRejected(getCallerRunsWhenRejected());
        }

        List<Processor> pipe = new ArrayList<Processor>(2);
        pipe.add(thread);
        pipe.add(createChildProcessor(routeContext, true));
View Full Code Here

            if (getRejectedPolicy() != null) {
                throw new IllegalArgumentException("RejectedPolicy and executorServiceRef options cannot be used together.");
            }
        }

        ThreadsProcessor thread = new ThreadsProcessor(routeContext.getCamelContext(), threadPool, shutdownThreadPool);
        if (getCallerRunsWhenRejected() == null) {
            // should be true by default
            thread.setCallerRunsWhenRejected(true);
        } else {
            thread.setCallerRunsWhenRejected(getCallerRunsWhenRejected());
        }
        thread.setRejectedPolicy(resolveRejectedPolicy(routeContext));

        List<Processor> pipe = new ArrayList<Processor>(2);
        pipe.add(thread);
        pipe.add(createChildProcessor(routeContext, true));
        // wrap in nested pipeline so this appears as one processor
View Full Code Here

TOP

Related Classes of org.apache.camel.processor.ThreadsProcessor

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.