Package org.activemq.message

Examples of org.activemq.message.ActiveMQTopic


                return new ActiveMQQueue(name);
            }
        });
        data.put("dynamicTopics", new LazyCreateContext() {
            protected Object createEntry(String name) {
                return new ActiveMQTopic(name);
            }
        });

        return new ReadOnlyContext(environment, data);
    }
View Full Code Here


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

    /**
     * @see org.activemq.service.MessageContainerAdmin#empty()
     */
    public void empty() throws JMSException {
        if( manager.isConsumerActiveOnDestination(new ActiveMQTopic(destinationName)) ) {
            messageStore.removeAllMessages();
        } else {
            throw new JMSException("Cannot empty a topic while it is use.");
        }
    }
View Full Code Here

    protected int prefetchValue = 10000000;

    protected Destination createDestination() {
        String subject = getClass().getName();
        if (isTopic) {
            return new ActiveMQTopic(subject);
        }
        else {
            return new ActiveMQQueue(subject);
        }
    }
View Full Code Here

    protected JabberWireFormat format = new JabberWireFormat();

    public void testWrite() throws Exception {
        ActiveMQTextMessage message = new ActiveMQTextMessage();
        //message.setJMSType("id");
        message.setJMSReplyTo(new ActiveMQTopic("my.source"));
        message.setJMSDestination(new ActiveMQTopic("my.target"));
        message.setJMSCorrelationID("abc123");
        message.setText("hello there");

        StringWriter buffer = new StringWriter();
        PrintWriter out = new PrintWriter(buffer);
View Full Code Here

        message.setJMSDestination(createDestination(subject));
        return message;
    }

    protected Destination createDestination(String subject) {
        return new ActiveMQTopic(subject);
    }
View Full Code Here

import junit.framework.TestCase;

public class TopicExpressionConverterTest extends TestCase {
   
    public void testConvert() {
        ActiveMQTopic topic1 = new ActiveMQTopic("Hello");
        TopicExpressionType type = TopicExpressionConverter.toTopicExpression(topic1);
        ActiveMQTopic topic2 = TopicExpressionConverter.toActiveMQTopic(type);
        assertEquals(topic1, topic2);       
    }
View Full Code Here

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

    public void XtestSendNotify() throws Exception {
       
        ActiveMQNotificationBroker broker = new ActiveMQNotificationBroker();
        ActiveMQConnection connection = broker.getConnection();
        Session session = connection.createSession(false, 0);
        ActiveMQTopic topic = new ActiveMQTopic("Test");
        MessageConsumer consumer = session.createConsumer(topic);
       
        NotifyDocument request = NotifyDocument.Factory.newInstance();
        Notify notify = request.addNewNotify();
        NotificationMessageHolderType messageHolder = notify.addNewNotificationMessage();
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

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.