Package org.activemq.message

Examples of org.activemq.message.ActiveMQTopic


            info.setClientId(brokerClientID);
            info.setStarted(true);
            client.consumeConnectionInfo(info);

            ConsumerInfo consumerInfo = new ConsumerInfo();
            consumerInfo.setDestination(new ActiveMQTopic(">"));
            consumerInfo.setNoLocal(true);
            consumerInfo.setClientId(brokerClientID);
            consumerInfo.setConsumerId(idGenerator.generateId());
            consumerInfo.setStarted(true);
            client.consumeConsumerInfo(consumerInfo);
View Full Code Here


        ActiveMQActivationSpec activationSpec = endpointActivationKey.getActivationSpec();
        if ("javax.jms.Queue".equals(activationSpec.getDestinationType())) {
            dest = new ActiveMQQueue(activationSpec.getDestination());
        } else if ("javax.jms.Topic".equals(activationSpec.getDestinationType())) {
            dest = new ActiveMQTopic(activationSpec.getDestination());
        } else {
            throw new ResourceException("Unknown destination type: " + activationSpec.getDestinationType());
        }
    }
View Full Code Here

        super(arg0);
    }

    public void testMatchConsumer(){
        String destName = "foo.bar";
        ActiveMQTopic topic = new ActiveMQTopic(destName);
        ConsumerInfo info = new ConsumerInfo();
        info.setDestination(topic);
       
        ActiveMQTopic advisoryDest = topic.getTopicForConsumerAdvisory();
        ConsumerInfo advisory = new ConsumerInfo();
        advisory.setDestination(advisoryDest);
        AdvisorySupport test = new AdvisorySupport(null);
        assertTrue(test.matchConsumer(advisory, info));
    }
View Full Code Here

        assertTrue(test.matchConsumer(advisory, info));
    }
   
    public void testMatchProducer(){
        String destName = "foo.bar";
        ActiveMQTopic topic = new ActiveMQTopic(destName);
        ProducerInfo info = new ProducerInfo();
        info.setDestination(topic);
       
        ActiveMQTopic advisoryDest = topic.getTopicForProducerAdvisory();
        ConsumerInfo advisory = new ConsumerInfo();
        advisory.setDestination(advisoryDest);
        AdvisorySupport test = new AdvisorySupport(null);
        assertTrue(test.matchProducer(advisory, info));
    }
View Full Code Here

    public void testMatchConnection(){
       
        ConnectionInfo info = new ConnectionInfo();
       
       
        ActiveMQTopic advisoryDest = new ActiveMQTopic(ActiveMQDestination.CONNECTION_ADVISORY_PREFIX);
        ConsumerInfo advisory = new ConsumerInfo();
        advisory.setDestination(advisoryDest);
        AdvisorySupport test = new AdvisorySupport(null);
        assertTrue(test.matchConnection(advisory, info));
    }
View Full Code Here

        ActiveMQDestination dest = null;
        if (isValidDestinationType() && isValidDestination()) {
            if (Queue.class.getName().equals(destinationType)) {
                dest = new ActiveMQQueue(destination);
            } else if (Topic.class.getName().equals(destinationType)) {
                dest = new ActiveMQTopic(destination);
            } else {
                assert false : "Execution should never reach here";
            }
        }
        return dest;
View Full Code Here

    public RegisterPublisherResponseDocument registerPublisher(RegisterPublisherDocument requestDoc) {

        // Check request.
        RegisterPublisher publisherInfo = requestDoc.getRegisterPublisher();
        ActiveMQTopic topic = TopicExpressionConverter.toActiveMQTopic(publisherInfo.getTopicArray());
        Calendar terminationTime = publisherInfo.getInitialTerminationTime();
        if( terminationTime!=null ) {
            // Termination time cannot be in the past
            if( terminationTime.before( Calendar.getInstance() ) ) {
                // Is this the right way to fault??
View Full Code Here

   
    static public ActiveMQTopic toActiveMQTopic(TopicExpressionType[] topicArray) {
        if( topicArray==null || topicArray.length==0 )
            return null;
       
        ActiveMQTopic childrenDestinations[] = new ActiveMQTopic[topicArray.length];
        for (int i = 0; i < topicArray.length; i++) {
            childrenDestinations[i] = toActiveMQTopic(topicArray[i]);
        }
       
        ActiveMQTopic topic = new ActiveMQTopic();
        topic.setChildDestinations(childrenDestinations);
        return topic;
    }
View Full Code Here

        if( SIMPLE_DIALECT.equals(dialect) ) {
           
            XmlCursor cursor = topic.newCursor();
            //cursor.toFirstContentToken();
            String textValue = cursor.getTextValue();           
            return new ActiveMQTopic(textValue);
           
        } else {
            throw new RuntimeException("Topic dialect: "+dialect+" not supported");
        }
    }
View Full Code Here

            info.setClientId(brokerClientID);
            info.setStarted(true);
            client.consumeConnectionInfo(info);

            ConsumerInfo consumerInfo = new ConsumerInfo();
            consumerInfo.setDestination(new ActiveMQTopic(">"));
            consumerInfo.setNoLocal(true);
            consumerInfo.setClientId(brokerClientID);
            consumerInfo.setConsumerId(idGenerator.generateId());
            consumerInfo.setStarted(true);
            client.consumeConsumerInfo(consumerInfo);
View Full Code Here

TOP

Related Classes of org.activemq.message.ActiveMQTopic

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.