Package org.fcrepo.client.messaging

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


        String clientId = "0";
        MessagingClient messagingClient =
                new JmsMessagingClient(clientId, this, properties, false);

        messagingClient.start();
        sendMessage(TOPIC_NAME);
        checkMessage(clientId, TOPIC);
        messagingClient.stop(true);
    }
View Full Code Here


        String clientId = "1";
        MessagingClient messagingClient =
                new JmsMessagingClient(clientId, this, properties, true);

        // 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
View Full Code Here

        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);
        messagingClient.stop(true);

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

        checkMessage(clientId, TOPIC);
        messagingClient.stop(true);

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

    public void testMessagingClientMultipleTopics() throws Exception {
View Full Code Here

        String topic = "org.fcrepo.test.additional";
        properties.setProperty("topic." + topicName, topic);
        MessagingClient messagingClient =
                new JmsMessagingClient(clientId, this, properties, true);

        messagingClient.start();
        sendMessage(TOPIC_NAME);
        checkMessage(clientId, TOPIC);
        sendMessage(topicName);
        checkMessage(clientId, topic);
        messagingClient.stop(true);
View Full Code Here

        String clientId = "3";
        MessagingClient messagingClient =
                new JmsMessagingClient(clientId, this, properties, false);

        messagingClient.start();
        sendMessage(QUEUE_NAME);
        checkMessage(clientId, QUEUE);
        messagingClient.stop(true);
    }
View Full Code Here

        // Selector to include test message
        String messageSelector = propertyName + " LIKE 'test%'";
        MessagingClient messagingClient =
                new JmsMessagingClient(clientId, this, properties,
                                       messageSelector, false);
        messagingClient.start();
        sendMessage(TOPIC_NAME);
        checkMessage(clientId, TOPIC);
        messagingClient.stop(true);

        clientId = "10";
View Full Code Here

        // Selector to omit test message
        messageSelector = propertyName + " LIKE 'testing%'";
        messagingClient =
                new JmsMessagingClient(clientId, this, properties,
                                       messageSelector, false);
        messagingClient.start();
        sendMessage(TOPIC_NAME);
        checkNoMessages();
        messagingClient.stop(true);
    }
View Full Code Here

    public void testAsynchronousStart() throws Exception {
        String clientId = "11";
        JmsMessagingClient messagingClient =
                new JmsMessagingClient(clientId, this, properties, false);

        messagingClient.start(false);
        long startTime = System.currentTimeMillis();
        long maxWaitTime = 60000;
        while(!messagingClient.isConnected()) {
            // Don't wait forever
            if(System.currentTimeMillis() - startTime > maxWaitTime) {
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.