Package org.fcrepo.client.messaging

Examples of org.fcrepo.client.messaging.MessagingClient


    }

    public void testMessagingClientTopic() throws Exception {

        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


    }

    public void testMessagingClientDurableTopic() throws Exception {

        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
        sendMessage(TOPIC_NAME);
        messagingClient.start();
        checkMessage(clientId, TOPIC);
        messagingClient.stop(true);

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

        String clientId = "2";
        String topicName = "additionalTopic";
        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

    }

    public void testMessagingClientQueue() throws Exception {

        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

    public void testMessageSelectors() throws Exception {

        String clientId = "9";
        // 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";
        // 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

TOP

Related Classes of org.fcrepo.client.messaging.MessagingClient

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.