Package org.apache.activemq.filter

Examples of org.apache.activemq.filter.DestinationFilter.matches()


    protected boolean doesConsumerExist(ActiveMQDestination dest) {
        DestinationFilter filter = DestinationFilter.parseFilter(dest);
        for (Iterator i = subscriptionMapByLocalId.values().iterator(); i.hasNext();) {
            DemandSubscription ds = (DemandSubscription)i.next();
            if (filter.matches(ds.getLocalInfo().getDestination())) {
                return true;
            }
        }
        return false;
    }
View Full Code Here


            t=0;
        if(messages[t]!=null){
            do{
                MessageReference ref=messages[t];
                Message message=ref.getMessage();
                if(filter.matches(message.getDestination())){
                    result.add(message);
                }
                t++;
                if(t>=messages.length)
                    t=0;
View Full Code Here

        DestinationFilter filter=DestinationFilter.parseFilter(destination);
        ActiveMQDestination[] dests = excludedDestinations;
        if(dests!=null&&dests.length>0){
            for(int i=0;i<dests.length;i++){
                ActiveMQDestination match=dests[i];
                if(match!=null&&filter.matches(match)){
                    return false;
                }
            }
        }
        dests = dynamicallyIncludedDestinations;
View Full Code Here

        }
        dests = dynamicallyIncludedDestinations;
        if(dests!=null&&dests.length>0){
            for(int i=0;i<dests.length;i++){
                ActiveMQDestination match=dests[i];
                if(match!=null&&filter.matches(match)){
                    return true;
                }
            }
            return false;
        }
View Full Code Here

        //search through existing subscriptions and see if we have a match
        boolean matched = false;
        DestinationFilter filter=DestinationFilter.parseFilter(info.getDestination());
        for (Iterator i = subscriptionMapByLocalId.values().iterator(); i.hasNext();){
            DemandSubscription ds = (DemandSubscription)i.next();
            if (filter.matches(ds.getLocalInfo().getDestination())){
                //add the interest in the subscription
                //ds.add(ds.getRemoteInfo().getConsumerId());
                ds.add(info.getConsumerId());
                matched = true;
                //continue - we want interest to any existing DemandSubscriptions
View Full Code Here

        DestinationFilter filter=DestinationFilter.parseFilter(destination);
        for (Iterator iter = copy.iterator(); iter.hasNext();) {
            TimestampWrapper timestampWrapper = (TimestampWrapper) iter.next();
            MessageReference ref = timestampWrapper.message;
            Message message=ref.getMessage();
            if (filter.matches(message.getDestination())){
                result.add(message);
            }
        }
        return (Message[]) result.toArray(new Message[result.size()]);
    }
View Full Code Here

            for (Iterator i = list.iterator(); i.hasNext();){
                MessageReference ref = (MessageReference)i.next();
                Message msg;
                try{
                    msg=ref.getMessage();
                    if (filter.matches(msg.getDestination())){
                        result.add(msg);
                    }
                }catch(IOException e){
                   log.error("Failed to get Message from MessageReference: " + ref,e);
                }
View Full Code Here

    protected boolean doesConsumerExist(ActiveMQDestination dest){
        DestinationFilter filter=DestinationFilter.parseFilter(dest);
        for(Iterator i=subscriptionMapByLocalId.values().iterator();i.hasNext();){
            DemandSubscription ds=(DemandSubscription) i.next();
            if(filter.matches(ds.getLocalInfo().getDestination())){
                return true;
            }
        }
        return false;
    }
View Full Code Here

    }

    public Message[] browse(ActiveMQDestination destination) throws Exception{
        List result = new ArrayList();
        DestinationFilter filter=DestinationFilter.parseFilter(destination);
        if (filter.matches(lastImage.getMessage().getDestination())){
            result.add(lastImage.getMessage());
        }
        return (Message[])result.toArray(new Message[result.size()]);
    }
View Full Code Here

    }

    public Message[] browse(ActiveMQDestination destination) throws Exception {
        List<Message> result = new ArrayList<Message>();
        DestinationFilter filter = DestinationFilter.parseFilter(destination);
        if (filter.matches(lastImage.getMessage().getDestination())) {
            result.add(lastImage.getMessage());
        }
        return result.toArray(new Message[result.size()]);
    }
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.