Examples of DestinationFilter


Examples of org.apache.activemq.filter.DestinationFilter

     
      // Are we not bridging temp destinations?
      if( destination.isTemporary() && !bridgeTempDestinations )
        return false;
     
        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;
        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

Examples of org.apache.activemq.filter.DestinationFilter

      if( info.getSelector()!=null )
        return false;
     
        //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

Examples of org.apache.activemq.filter.DestinationFilter

    }
   
    public Message[] browse(ActiveMQDestination destination) throws Exception{
        List result = new ArrayList();
        ArrayList copy = new ArrayList(buffer);
        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

Examples of org.apache.activemq.filter.DestinationFilter

        return getList();
    }
   
    public Message[] browse(ActiveMQDestination destination) {
        List result = new ArrayList();
        DestinationFilter filter=DestinationFilter.parseFilter(destination);
        synchronized(lock){
            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

Examples of org.apache.activemq.filter.DestinationFilter

        String subscriberName = getLocalBrokerName()+"_"+dest.getPhysicalName();
        return subscriberName;
    }

    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

Examples of org.apache.activemq.filter.DestinationFilter

    public void stop() throws Exception {
    }

    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

Examples of org.apache.activemq.filter.DestinationFilter

    public void stop() throws Exception {
    }

    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

Examples of org.apache.activemq.filter.DestinationFilter

        this.maximumSize = maximumSize;
    }

    public synchronized Message[] browse(ActiveMQDestination destination) throws Exception {
        List<Message> result = new ArrayList<Message>();
        DestinationFilter filter = DestinationFilter.parseFilter(destination);
        int t = tail;
        if (messages[t] == null) {
            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

Examples of org.apache.activemq.filter.DestinationFilter

    }

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

Examples of org.apache.activemq.filter.DestinationFilter

        return getList();
    }

    public Message[] browse(ActiveMQDestination destination) {
        List<Message> result = new ArrayList<Message>();
        DestinationFilter filter = DestinationFilter.parseFilter(destination);
        synchronized (lock) {
            for (Iterator<MessageReference> i = list.iterator(); i.hasNext();) {
                MessageReference ref = i.next();
                Message msg;
                msg = ref.getMessage();
                if (filter.matches(msg.getDestination())) {
                    result.add(msg);
                }

            }
        }
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.