Package org.activemq.message

Examples of org.activemq.message.ActiveMQDestination


    }

    boolean matchProducer(ConsumerInfo advisory, ProducerInfo info) {
        boolean result = false;
        if (advisory != null && advisory.getDestination() != null && info != null && info.getDestination() != null) {
            ActiveMQDestination advisoryDestination = advisory.getDestination();
            ActiveMQDestination destination = info.getDestination();
            if (advisoryDestination.isProducerAdvisory()) {
                ActiveMQDestination match = advisoryDestination.getDestinationBeingAdvised();
                return match.matches(destination) || matchGeneralAdvisory(advisory, destination);
            }
        }
        return result;
    }
View Full Code Here


     * @return true if a general 'catch-all' advisory subscriber
     */
    private boolean matchGeneralAdvisory(ConsumerInfo advisory, ActiveMQDestination destination) {
        boolean result = advisory.getDestination() != null && advisory.getDestination().isAdvisory();
        if (result) {
            ActiveMQDestination match = advisory.getDestination().getDestinationBeingAdvised();
            result = match.matches(destination);
        }
        return result;
    }
View Full Code Here

    }

    boolean matchTempDestinationAdvisory(ConsumerInfo advisory, ActiveMQDestination destination) {
        boolean result = false;
        if (advisory != null && advisory.getDestination() != null) {
            ActiveMQDestination advisoryDestination = advisory.getDestination();
            if (advisoryDestination.isTempDestinationAdvisory()) {
                ActiveMQDestination match = advisoryDestination.getDestinationBeingAdvised();
                return match.matches(destination) || matchGeneralAdvisory(advisory, destination);
            }
        }
        return result;
    }
View Full Code Here

     * @param info
     * @throws JMSException
     * @throws JMSSecurityException if client authentication fails for the Destination the Consumer applies for
     */
    public void registerMessageProducer(BrokerClient client, ProducerInfo info) throws JMSException {
        ActiveMQDestination dest = info.getDestination();
        checkTempDestinationExistance(dest);
        getBroker().addMessageProducer(client, info);

        producerInfos.put(info, client);
    }
View Full Code Here

     * @param client
     * @param message
     * @throws JMSException
     */
    public void sendMessage(BrokerClient client, ActiveMQMessage message) throws JMSException {
        ActiveMQDestination dest = message.getJMSActiveMQDestination();       
        checkTempDestinationExistance(dest);
        broker.sendMessage(client, message);
    }
View Full Code Here

    public void testSuccessfulCreateQueueDestination() {
        activationSpec.setDestinationType(Queue.class.getName());
        activationSpec.setDestination(DESTINATION);
        assertActivationSpecValid();
        ActiveMQDestination destination = activationSpec.createDestination();
        assertNotNull("ActiveMQDestination not created", destination);
        assertEquals("Physical name not the same", activationSpec.getDestination(), destination.getPhysicalName());
        assertTrue("Destination is not a Queue", destination instanceof Queue);
    }
View Full Code Here

    public void testSuccessfulCreateTopicDestination() {
        activationSpec.setDestinationType(Topic.class.getName());
        activationSpec.setDestination(DESTINATION);
        assertActivationSpecValid();
        ActiveMQDestination destination = activationSpec.createDestination();
        assertNotNull("ActiveMQDestination not created", destination);
        assertEquals("Physical name not the same", activationSpec.getDestination(), destination.getPhysicalName());
        assertTrue("Destination is not a Topic", destination instanceof Topic);
    }
View Full Code Here

    }

    public void testCreateDestinationIncorrectType() {
        activationSpec.setDestinationType(null);
        activationSpec.setDestination(DESTINATION);
        ActiveMQDestination destination = activationSpec.createDestination();
        assertNull("ActiveMQDestination should not have been created", destination);
    }
View Full Code Here

    }

    public void testCreateDestinationIncorrectDestinationName() {
        activationSpec.setDestinationType(Topic.class.getName());
        activationSpec.setDestination(null);
        ActiveMQDestination destination = activationSpec.createDestination();
        assertNull("ActiveMQDestination should not have been created", destination);
    }
View Full Code Here

    public void addMessageConsumer(BrokerClient client, ConsumerInfo info) throws JMSException {
        super.addMessageConsumer(client, info);

        // lookup message for destination
        ActiveMQDestination destination = info.getDestination();
        if (isValid(destination)) {
            if (destination.isWildcard()) {
                DestinationFilter filter = DestinationFilter.parseFilter(destination);
                sendMatchingInitialImages(client, info, filter);
            }
            else {
                ActiveMQMessage message = null;
View Full Code Here

TOP

Related Classes of org.activemq.message.ActiveMQDestination

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.