Package org.apache.cxf.workqueue

Examples of org.apache.cxf.workqueue.WorkQueueManager


       
        if (executor == null || SynchronousExecutor.isA(executor)) {
            // need true asynchrony
            Bus bus = message.getExchange().get(Bus.class);
            if (bus != null) {
                WorkQueueManager workQueueManager =
                    bus.getExtension(WorkQueueManager.class);
                Executor autoWorkQueue =
                    workQueueManager.getNamedWorkQueue("ws-addressing");
                executor = autoWorkQueue != null
                           ? autoWorkQueue
                           :  workQueueManager.getAutomaticWorkQueue();
            } else {
                executor = OneShotAsyncExecutor.getInstance();
            }
        }
        message.getExchange().put(Executor.class, executor);
View Full Code Here


        }
    }
   
    public Executor getExecutor(Bus bus) {
        if (executor == null && bus != null) {
            WorkQueueManager manager = bus.getExtension(WorkQueueManager.class);
            if (manager != null) {
                Executor ex =  manager.getNamedWorkQueue("local-transport");
                if (ex == null) {
                    ex = manager.getAutomaticWorkQueue();
                }
                return ex;
            }
        }
        return executor;
View Full Code Here

                            ex2.execute(origRunnable);
                        }
                    };
                }
                if (ex == null || forceWQ) {
                    WorkQueueManager mgr = outMessage.getExchange().get(Bus.class)
                        .getExtension(WorkQueueManager.class);
                    AutomaticWorkQueue qu = mgr.getNamedWorkQueue("http-conduit");
                    if (qu == null) {
                        qu = mgr.getAutomaticWorkQueue();
                    }
                    long timeout = 1000;
                    if (policy != null && policy.isSetAsyncExecuteTimeout()) {
                        timeout = policy.getAsyncExecuteTimeout();
                    }
View Full Code Here

                if (multi) {
                    mp = new HashMap<String, Object>(message.getExchange());
                }
               
                if (async) {
                    WorkQueueManager queuem = bus.getExtension(WorkQueueManager.class);
                    WorkQueue queue = queuem.getNamedWorkQueue("udp-conduit");
                    if (queue == null) {
                        queue = queuem.getAutomaticWorkQueue();
                    }
                    queue.execute(new Runnable() {
                        public void run() {
                            incomingObserver.onMessage(inMessage);
                        }
View Full Code Here

        inMessage = m;   
        incomingObserver = observer;
        continuations = cList;
        this.jmsListener = jmsListener;
        this.jmsConfig = jmsConfig;
        WorkQueueManager manager = bus.getExtension(WorkQueueManager.class);
        if (manager != null) {
            workQueue =  manager.getNamedWorkQueue("jms-continuation");
            if (workQueue == null) {
                workQueue = manager.getAutomaticWorkQueue();
            }
        } else {
            LOG.warning("ERROR_GETTING_WORK_QUEUE");
        }
        loader = bus.getExtension(ClassLoader.class);
View Full Code Here

    protected Logger getLogger() {
        return LOG;
    }

    protected void activate() {
        WorkQueueManager queuem = bus.getExtension(WorkQueueManager.class);
        queue = queuem.getNamedWorkQueue("udp-transport");
        if (queue == null) {
            queue = queuem.getAutomaticWorkQueue();
        }
       
        try {
            URI uri = new URI(this.getAddress().getAddress().getValue());
            InetSocketAddress isa = null;
View Full Code Here

            if (ex != null) {
                outMessage.getExchange().put(Executor.class.getName()
                                             + ".USING_SPECIFIED", Boolean.TRUE);
                ex.execute(runnable);
            } else {
                WorkQueueManager mgr = outMessage.getExchange().get(Bus.class)
                    .getExtension(WorkQueueManager.class);
                AutomaticWorkQueue qu = mgr.getNamedWorkQueue("camel-cxf-conduit");
                if (qu == null) {
                    qu = mgr.getAutomaticWorkQueue();
                }
                // need to set the time out somewhere
                qu.execute(runnable);
            }
        } catch (RejectedExecutionException rex) {
View Full Code Here

                    }
                };
                try {
                    Executor ex = outMessage.getExchange().get(Executor.class);
                    if (ex == null) {
                        WorkQueueManager mgr = outMessage.getExchange().get(Bus.class)
                            .getExtension(WorkQueueManager.class);
                        AutomaticWorkQueue qu = mgr.getNamedWorkQueue("http-conduit");
                        if (qu == null) {
                            qu = mgr.getAutomaticWorkQueue();
                        }
                        qu.execute(runnable, 5000);
                    } else {
                        outMessage.getExchange().put(Executor.class.getName()
                                                 + ".USING_SPECIFIED", Boolean.TRUE);
View Full Code Here

       
        if (executor == null || SynchronousExecutor.isA(executor)) {
            // need true asynchrony
            Bus bus = message.getExchange().get(Bus.class);
            if (bus != null) {
                WorkQueueManager workQueueManager =
                    bus.getExtension(WorkQueueManager.class);
                Executor autoWorkQueue =
                    workQueueManager.getNamedWorkQueue("ws-addressing");
                executor = autoWorkQueue != null
                           ? autoWorkQueue
                           :  workQueueManager.getAutomaticWorkQueue();
            } else {
                executor = OneShotAsyncExecutor.getInstance();
            }
        }
        message.getExchange().put(Executor.class, executor);
View Full Code Here

                        } catch (IOException e) {
                            LOG.log(Level.WARNING, e.getMessage(), e);
                        }
                    }
                };
                WorkQueueManager mgr = outMessage.getExchange().get(Bus.class)
                    .getExtension(WorkQueueManager.class);
                AutomaticWorkQueue queue = mgr.getNamedWorkQueue("http-conduit");
                if (queue == null) {
                    queue = mgr.getAutomaticWorkQueue();
                }
                queue.execute(runnable);
            }
        }
View Full Code Here

TOP

Related Classes of org.apache.cxf.workqueue.WorkQueueManager

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.