Package org.apache.activemq.broker.region

Examples of org.apache.activemq.broker.region.Destination


                if (!msg.isPersistent()) {
                    nonPersistent.addMessageLast(node);
                }
            }
            if (msg.isPersistent()) {
                Destination dest = msg.getRegionDestination();
                TopicStorePrefetch tsp = topics.get(dest);
                if (tsp != null) {
                    tsp.addMessageLast(node);
                }
            }
View Full Code Here


        regionBroker.unregisterSubscription(sub);
        super.destroySubscription(sub);
    }

    protected Destination createDestination(ConnectionContext context, ActiveMQDestination destination) throws Exception {
        Destination rc = super.createDestination(context, destination);
        regionBroker.register(destination, rc);
        return rc;
    }
View Full Code Here

    private BrokerService brokerService;

    public Destination intercept(final Destination destination) {
        if (destination.getActiveMQDestination().isQueue()) {
            try {
                final Destination mirrorDestination = getMirrorDestination(destination);
                if (mirrorDestination != null) {
                    return new DestinationFilter(destination) {
                        public void send(ProducerBrokerExchange context, Message message) throws Exception {
                            message.setDestination(mirrorDestination.getActiveMQDestination());
                            mirrorDestination.send(context, message);

                            if (isCopyMessage()) {
                                message = message.copy();
                            }
                            message.setDestination(destination.getActiveMQDestination());
View Full Code Here

    public Destination intercept(Destination destination) {
        Set virtualDestinations = destinationMap.get(destination.getActiveMQDestination());
        List<Destination> destinations = new ArrayList<Destination>();
        for (Iterator iter = virtualDestinations.iterator(); iter.hasNext();) {
            VirtualDestination virtualDestination = (VirtualDestination)iter.next();
            Destination newNestination = virtualDestination.intercept(destination);
            destinations.add(newNestination);
        }
        if (!destinations.isEmpty()) {
            if (destinations.size() == 1) {
                return destinations.get(0);
View Full Code Here

    protected Destination createCompositeDestination(Destination destination, final List<Destination> destinations) {
        return new DestinationFilter(destination) {
            public void send(ProducerBrokerExchange context, Message messageSend) throws Exception {
                for (Iterator<Destination> iter = destinations.iterator(); iter.hasNext();) {
                    Destination destination = iter.next();
                    destination.send(context, messageSend);
                }
            }
        };
    }
View Full Code Here

        regionBroker.unregisterSubscription(sub);
        super.destroySubscription(sub);
    }

    protected Destination createDestination(ConnectionContext context, ActiveMQDestination destination) throws Exception {
        Destination rc = super.createDestination(context, destination);
        regionBroker.register(destination, rc);
        return rc;
    }
View Full Code Here

            producers.put(info.getProducerId(), info);
        }
    }

    public Destination addDestination(ConnectionContext context, ActiveMQDestination destination) throws Exception {
        Destination answer = next.addDestination(context, destination);
        if (!AdvisorySupport.isAdvisoryTopic(destination)) {
            ActiveMQTopic topic = AdvisorySupport.getDestinationAdvisoryTopic(destination);
            DestinationInfo info = new DestinationInfo(context.getConnectionId(), DestinationInfo.ADD_OPERATION_TYPE, destination);
            fireAdvisory(context, topic, info);
            destinations.put(destination, info);
View Full Code Here

                if (!msg.isPersistent()) {
                    nonPersistent.addMessageLast(node);
                }
            }
            if (msg.isPersistent()) {
                Destination dest = msg.getRegionDestination();
                TopicStorePrefetch tsp = topics.get(dest);
                if (tsp != null) {
                    tsp.addMessageLast(node);
                }
            }
View Full Code Here

    }
   
    protected int getMinimumMessageSize() {
        int result = DEFAULT_MINIMUM_MESSAGE_SIZE;
        //let destination override
        Destination dest = regionDestination;
        if (dest != null) {
            result=dest.getMinimumMessageSize();
        }
        return result;
    }
View Full Code Here

        final SecurityContext securityContext = (SecurityContext)context.getSecurityContext();
        if (securityContext == null) {
            throw new SecurityException("User is not authenticated.");
        }
       
        Destination existing = this.getDestinationMap().get(destination);
        if (existing != null) {
          return existing;
        }
       
        // if(!((ActiveMQTempDestination)destination).getConnectionId().equals(context.getConnectionId().getValue())
View Full Code Here

TOP

Related Classes of org.apache.activemq.broker.region.Destination

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.