Package org.fcrepo.client.messaging

Examples of org.fcrepo.client.messaging.JmsMessagingClient.stop()


                new JmsMessagingClient(clientId, this, properties, false);

        messagingClient.start();
        sendMessage(TOPIC_NAME);
        checkMessage(clientId, TOPIC);
        messagingClient.stop(true);
    }

    public void testMessagingClientDurableTopic() throws Exception {

        String clientId = "1";
View Full Code Here


        // Establish that the client can start and receive messages
        messagingClient.start();
        sendMessage(TOPIC_NAME);
        checkMessage(clientId, TOPIC);
        messagingClient.stop(false);

        // Check to see if messages are received in a durable fashion
        sendMessage(TOPIC_NAME);
        messagingClient.start();
        checkMessage(clientId, TOPIC);
View Full Code Here

        // Check to see if messages are received in a durable fashion
        sendMessage(TOPIC_NAME);
        messagingClient.start();
        checkMessage(clientId, TOPIC);
        messagingClient.stop(true);

        // Make sure durable subscriptions were closed
        sendMessage(TOPIC_NAME);
        messagingClient.start();
        checkNoMessages();
View Full Code Here

        // Make sure durable subscriptions were closed
        sendMessage(TOPIC_NAME);
        messagingClient.start();
        checkNoMessages();
        messagingClient.stop(true);
    }

    public void testMessagingClientMultipleTopics() throws Exception {

        String clientId = "2";
View Full Code Here

        messagingClient.start();
        sendMessage(TOPIC_NAME);
        checkMessage(clientId, TOPIC);
        sendMessage(topicName);
        checkMessage(clientId, topic);
        messagingClient.stop(true);
    }

    public void testMessagingClientQueue() throws Exception {

        String clientId = "3";
View Full Code Here

                new JmsMessagingClient(clientId, this, properties, false);

        messagingClient.start();
        sendMessage(QUEUE_NAME);
        checkMessage(clientId, QUEUE);
        messagingClient.stop(true);
    }

    public void testInvalidProperties() throws Exception {
        // Null properties
        try {
View Full Code Here

                new JmsMessagingClient(clientId, this, properties,
                                       messageSelector, false);
        messagingClient.start();
        sendMessage(TOPIC_NAME);
        checkMessage(clientId, TOPIC);
        messagingClient.stop(true);

        clientId = "10";
        // Selector to omit test message
        messageSelector = propertyName + " LIKE 'testing%'";
        messagingClient =
View Full Code Here

                new JmsMessagingClient(clientId, this, properties,
                                       messageSelector, false);
        messagingClient.start();
        sendMessage(TOPIC_NAME);
        checkNoMessages();
        messagingClient.stop(true);
    }

    public void testAsynchronousStart() throws Exception {
        String clientId = "11";
        JmsMessagingClient messagingClient =
View Full Code Here

                     maxWaitTime/1000 + " seconds.");
            }
        }
        sendMessage(TOPIC_NAME);
        checkMessage(clientId, TOPIC);
        messagingClient.stop(true);
    }

    private void sendMessage(String jndiName) throws Exception {
        JMSManager jmsManager = new JMSManager(properties);
        TextMessage message = jmsManager.createTextMessage(jndiName, messageText);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.