Package org.codehaus.activemq.service

Examples of org.codehaus.activemq.service.QueueList


                    //need to do wildcards for this - but for now use exact matches
                    for (Iterator iter = messageContainers.values().iterator(); iter.hasNext();) {
                        QueueMessageContainer container = (QueueMessageContainer) iter.next();
                        //should change this for wild cards ...
                        if (container.getDestinationName().equals(sub.getDestination().getPhysicalName())) {
                            QueueList list = getSubscriptionList(container);
                            list.remove(sub);
                            if (list.isEmpty()) {
                                activeSubscriptions.remove(sub.getDestination().getPhysicalName());
                            }
                            list = getBrowserList(container);
                            list.remove(sub);
                            if (list.isEmpty()) {
                                browsers.remove(sub.getDestination().getPhysicalName());
                            }
                        }
                    }
                }
View Full Code Here


    public void poll() throws JMSException {
        synchronized (subscriptionMutex) {
            for (Iterator iter = activeSubscriptions.keySet().iterator(); iter.hasNext();) {
                QueueMessageContainer container = (QueueMessageContainer) iter.next();

                QueueList browserList = (QueueList) browsers.get(container);
                doPeek(container, browserList);
                QueueList list = (QueueList) activeSubscriptions.get(container);
                doPoll(container, list);
            }
        }
    }
View Full Code Here

    private void updateActiveSubscriptions(QueueMessageContainer container, Subscription sub) throws JMSException {
        //need to do wildcards for this - but for now use exact matches
        //should change this for wild cards ...
        if (container.getDestinationName().equals(sub.getDestination().getPhysicalName())) {
            container.reset();//reset container - flushing all filter out messages to new consumer
            QueueList list = getSubscriptionList(container);
            if (!list.contains(sub)) {
                list.add(sub);
            }
        }
    }
View Full Code Here

            }
        }
    }

    private QueueList getSubscriptionList(QueueMessageContainer container) {
        QueueList list = (QueueList) activeSubscriptions.get(container);
        if (list == null) {
            list = new DefaultQueueList();
            activeSubscriptions.put(container, list);
        }
        return list;
View Full Code Here

    private void updateBrowsers(QueueMessageContainer container, Subscription sub) throws JMSException {
        //need to do wildcards for this - but for now use exact matches
        //should change this for wild cards ...
        if (container.getDestinationName().equals(sub.getDestination().getPhysicalName())) {
            container.reset();//reset container - flushing all filter out messages to new consumer
            QueueList list = getBrowserList(container);
            if (!list.contains(sub)) {
                list.add(sub);
            }
        }
    }
View Full Code Here

            }
        }
    }

    private QueueList getBrowserList(QueueMessageContainer container) {
        QueueList list = (QueueList) browsers.get(container);
        if (list == null) {
            list = new DefaultQueueList();
            browsers.put(container, list);
        }
        return list;
View Full Code Here

                    //need to do wildcards for this - but for now use exact matches
                    for (Iterator iter = messageContainers.values().iterator(); iter.hasNext();) {
                        QueueMessageContainer container = (QueueMessageContainer) iter.next();
                        //should change this for wild cards ...
                        if (container.getDestinationName().equals(sub.getDestination().getPhysicalName())) {
                            QueueList list = getSubscriptionList(container);
                            list.remove(sub);
                            if (list.isEmpty()) {
                                activeSubscriptions.remove(sub.getDestination().getPhysicalName());
                            }
                            list = getBrowserList(container);
                            list.remove(sub);
                            if (list.isEmpty()) {
                                browsers.remove(sub.getDestination().getPhysicalName());
                            }
                        }
                    }
                }
View Full Code Here

    public void poll() throws JMSException {
        synchronized (subscriptionMutex) {
            for (Iterator iter = activeSubscriptions.keySet().iterator(); iter.hasNext();) {
                QueueMessageContainer container = (QueueMessageContainer) iter.next();

                QueueList browserList = (QueueList) browsers.get(container);
                doPeek(container, browserList);
                QueueList list = (QueueList) activeSubscriptions.get(container);
                doPoll(container, list);
            }
        }
    }
View Full Code Here

    private void updateActiveSubscriptions(QueueMessageContainer container, Subscription sub) throws JMSException {
        //need to do wildcards for this - but for now use exact matches
        //should change this for wild cards ...
        if (container.getDestinationName().equals(sub.getDestination().getPhysicalName())) {
            container.reset();//reset container - flushing all filter out messages to new consumer
            QueueList list = getSubscriptionList(container);
            if (!list.contains(sub)) {
                list.add(sub);
            }
        }
    }
View Full Code Here

            }
        }
    }

    private QueueList getSubscriptionList(QueueMessageContainer container) {
        QueueList list = (QueueList) activeSubscriptions.get(container);
        if (list == null) {
            list = new DefaultQueueList();
            activeSubscriptions.put(container, list);
        }
        return list;
View Full Code Here

TOP

Related Classes of org.codehaus.activemq.service.QueueList

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.