Package org.apache.activemq.filter

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


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

    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

        // 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
View Full Code Here

        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

        ConnectionContext adminConnectionContext = getAdminConnectionContext();
        Set<ActiveMQDestination> destinations = destinationFactory.getDestinations();
        DestinationFilter filter = getVirtualTopicConsumerDestinationFilter();
        if (!destinations.isEmpty()) {
            for (ActiveMQDestination destination : destinations) {
                if (filter.matches(destination) == true) {
                    broker.addDestination(adminConnectionContext, destination, false);
                }
            }
        }
    }
View Full Code Here

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

        dests = excludedDestinations;
        if (dests != null && dests.length > 0) {
            for (int i = 0; i < dests.length; i++) {
                ActiveMQDestination match = dests[i];
                DestinationFilter exclusionFilter = DestinationFilter.parseFilter(match);
                if (match != null && exclusionFilter.matches(destination) && dests[i].getDestinationType() == destination.getDestinationType()) {
                    return false;
                }
            }
        }
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.