Package org.codehaus.activemq.message

Examples of org.codehaus.activemq.message.ActiveMQTopic


    /**
     * Factory method to create new Topic instances
     */
    protected Topic createTopic(String name) {
        return new ActiveMQTopic(name);
    }
View Full Code Here


  protected void setUp() throws Exception {
    super.setUp();
    this.jmsMessageID = "testid";
    this.jmsClientID = "testclientid";
    this.jmsCorrelationID = "testcorrelationid";
    this.jmsDestination = new ActiveMQTopic("test.topic");
    this.jmsReplyTo = new ActiveMQTemporaryTopic("test.replyto.topic");
    this.jmsDeliveryMode = DeliveryMode.NON_PERSISTENT;
    this.jmsRedelivered = true;
    this.jmsType = "test type";
    this.jmsExpiration = 100000;
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.setId(consumerInfo.getConsumerId());
            consumerInfo.setStarted(true);
View Full Code Here

        log("Defaulting to use topics: " + defaultTopicFlag);

        name = servletConfig.getInitParameter("destination");
        if (name != null) {
            if (defaultTopicFlag) {
                defaultDestination = new ActiveMQTopic(name);
            }
            else {
                defaultDestination = new ActiveMQQueue(name);
            }
        }
View Full Code Here

     * @throws JMSException if the session fails to create a topic due to some internal error.
     * @since 1.1
     */
    public Topic createTopic(String topicName) throws JMSException {
        checkClosed();
        return new ActiveMQTopic(topicName);
    }
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

     */
    public void start() throws JMSException{
        if (started.commit(false,true)){
            session = connection.createSession(false,Session.AUTO_ACKNOWLEDGE);
            String advisoryName = ActiveMQDestination.CONNECTION_ADVISORY_PREFIX;
            Destination advisoryDestination = new ActiveMQTopic(advisoryName);
            MessageConsumer consumer = session.createConsumer(advisoryDestination);
            consumer.setMessageListener(this);
        }
    }
View Full Code Here

        answer.setConsumerIdentifer("consumerId");
        answer.setEntryBrokerName("entryBroker");
        answer.setJMSClientID("myClientID");
        answer.setJMSCorrelationID("myCorrelationID");
        answer.setJMSDeliveryMode(DeliveryMode.PERSISTENT);
        answer.setJMSDestination(new ActiveMQTopic("FOO.BAR"));
        answer.setJMSExpiration(1234);
        answer.setJMSMessageID("message:123");
        answer.setJMSPriority(2);
        answer.setJMSReplyTo(new ActiveMQQueue("BAR.REPLY"));
        answer.setJMSType("Cheddar");
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 = new ActiveMQTopic(ActiveMQDestination.CONSUMER_ADVISORY_PREFIX + destName);
        ConsumerInfo advisory = new ConsumerInfo();
        advisory.setDestination(advisoryDest);
        AdvisorySupport test = new AdvisorySupport();
        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 = new ActiveMQTopic(ActiveMQDestination.PRODUCER_ADVISORY_PREFIX + destName);
        ConsumerInfo advisory = new ConsumerInfo();
        advisory.setDestination(advisoryDest);
        AdvisorySupport test = new AdvisorySupport();
        assertTrue(test.matchProducer(advisory, info));
    }
View Full Code Here

TOP

Related Classes of org.codehaus.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.