Package org.apache.qpid.util

Examples of org.apache.qpid.util.ConversationFactory


        log.debug("public Circuit createCircuit(ParsedProperties testProperties): called");

        List<TestClientDetails> senders = new LinkedList<TestClientDetails>();
        senders.add(getSender());
        List<TestClientDetails> receivers = getReceivers();
        ConversationFactory conversationFactory = getConversationFactory();

        return DistributedCircuitImpl.createCircuit(testProperties, senders, receivers, conversationFactory);
    }
View Full Code Here


    {
        log.debug("protected Message[] sequenceTest(Object... testProperties = " + testProperties + "): called");

        TestClientDetails sender = getSender();
        List<TestClientDetails> receivers = getReceivers();
        ConversationFactory conversationFactory = getConversationFactory();

        try
        {
            Session session = conversationFactory.getSession();
            Destination senderControlTopic = session.createTopic(sender.privateControlKey);
            Destination receiverControlTopic = session.createTopic(receivers.get(0).privateControlKey);

            ConversationFactory.Conversation senderConversation = conversationFactory.startConversation();
            ConversationFactory.Conversation receiverConversation = conversationFactory.startConversation();

            Message assignSender = conversationFactory.getSession().createMessage();
            TestUtils.setPropertiesOnMessage(assignSender, testProperties);
            assignSender.setStringProperty("CONTROL_TYPE", "ASSIGN_ROLE");
            assignSender.setStringProperty("ROLE", "SENDER");

            senderConversation.send(senderControlTopic, assignSender);
View Full Code Here

        log.debug("public Circuit createCircuit(ParsedProperties testProperties): called");

        List<TestClientDetails> senders = new LinkedList<TestClientDetails>();
        senders.add(getSender());
        List<TestClientDetails> receivers = getReceivers();
        ConversationFactory conversationFactory = getConversationFactory();

        return DistributedCircuitImpl.createCircuit(testProperties, senders, receivers, conversationFactory);
    }
View Full Code Here

    {
        log.debug("protected Message[] sequenceTest(Object... testProperties = " + testProperties + "): called");

        TestClientDetails sender = getSender();
        List<TestClientDetails> receivers = getReceivers();
        ConversationFactory conversationFactory = getConversationFactory();

        try
        {
            // Create a conversation on the sender clients private control route.
            Session session = conversationFactory.getSession();
            Destination senderControlTopic = session.createTopic(sender.privateControlKey);
            ConversationFactory.Conversation senderConversation = conversationFactory.startConversation();

            // Assign the sender role to the sending test client.
            Message assignSender = conversationFactory.getSession().createMessage();
            TestUtils.setPropertiesOnMessage(assignSender, testProperties);
            assignSender.setStringProperty("CONTROL_TYPE", "ASSIGN_ROLE");
            assignSender.setStringProperty("ROLE", "SENDER");
            assignSender.setStringProperty("CLIENT_NAME", "Sustained_SENDER");
View Full Code Here

        throws JMSException
    {
        log.info("assignReceiverRole(TestClientDetails receivers = " + receiver + ", Map<String, Object> testProperties = "
            + testProperties + "): called");

        ConversationFactory conversationFactory = getConversationFactory();

        // Create a conversation with the receiving test client.
        Session session = conversationFactory.getSession();
        Destination receiverControlTopic = session.createTopic(receiver.privateControlKey);
        ConversationFactory.Conversation receiverConversation = conversationFactory.startConversation();

        // Assign the receivers role to the receiving client.
        Message assignReceiver = session.createMessage();
        TestUtils.setPropertiesOnMessage(assignReceiver, testProperties);
        assignReceiver.setStringProperty("CONTROL_TYPE", "ASSIGN_ROLE");
View Full Code Here

        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);

        Destination controlTopic = session.createTopic("iop.control");
        Destination responseQueue = session.createQueue("coordinator");

        conversationFactory = new ConversationFactory(connection, responseQueue, LinkedBlockingQueue.class);
        ConversationFactory.Conversation conversation = conversationFactory.startConversation();

        connection.start();

        // Broadcast the compulsory invitation to find out what clients are available to test.
View Full Code Here

    {
        log.debug("protected Message[] sequenceTest(Object... testProperties = " + testProperties + "): called");

        TestClientDetails sender = getSender();
        List<TestClientDetails> receivers = getReceivers();
        ConversationFactory conversationFactory = getConversationFactory();

        try
        {
            Session session = conversationFactory.getSession();
            Destination senderControlTopic = session.createTopic(sender.privateControlKey);
            Destination receiverControlTopic = session.createTopic(receivers.get(0).privateControlKey);

            ConversationFactory.Conversation senderConversation = conversationFactory.startConversation();
            ConversationFactory.Conversation receiverConversation = conversationFactory.startConversation();

            Message assignSender = conversationFactory.getSession().createMessage();
            TestUtils.setPropertiesOnMessage(assignSender, testProperties);
            assignSender.setStringProperty("CONTROL_TYPE", "ASSIGN_ROLE");
            assignSender.setStringProperty("ROLE", "SENDER");

            senderConversation.send(senderControlTopic, assignSender);
View Full Code Here

        log.debug("public Circuit createCircuit(ParsedProperties testProperties): called");

        List<TestClientDetails> senders = new LinkedList<TestClientDetails>();
        senders.add(getSender());
        List<TestClientDetails> receivers = getReceivers();
        ConversationFactory conversationFactory = getConversationFactory();

        return DistributedCircuitImpl.createCircuit(testProperties, senders, receivers, conversationFactory);
    }
View Full Code Here

    {
        log.debug("protected Message[] sequenceTest(Object... testProperties = " + testProperties + "): called");

        TestClientDetails sender = getSender();
        List<TestClientDetails> receivers = getReceivers();
        ConversationFactory conversationFactory = getConversationFactory();

        try
        {
            // Create a conversation on the sender clients private control route.
            Session session = conversationFactory.getSession();
            Destination senderControlTopic = session.createTopic(sender.privateControlKey);
            ConversationFactory.Conversation senderConversation = conversationFactory.startConversation();

            // Assign the sender role to the sending test client.
            Message assignSender = conversationFactory.getSession().createMessage();
            TestUtils.setPropertiesOnMessage(assignSender, testProperties);
            assignSender.setStringProperty("CONTROL_TYPE", "ASSIGN_ROLE");
            assignSender.setStringProperty("ROLE", "SENDER");
            assignSender.setStringProperty("CLIENT_NAME", "Sustained_SENDER");
View Full Code Here

        throws JMSException
    {
        log.info("assignReceiverRole(TestClientDetails receivers = " + receiver + ", Map<String, Object> testProperties = "
            + testProperties + "): called");

        ConversationFactory conversationFactory = getConversationFactory();

        // Create a conversation with the receiving test client.
        Session session = conversationFactory.getSession();
        Destination receiverControlTopic = session.createTopic(receiver.privateControlKey);
        ConversationFactory.Conversation receiverConversation = conversationFactory.startConversation();

        // Assign the receivers role to the receiving client.
        Message assignReceiver = session.createMessage();
        TestUtils.setPropertiesOnMessage(assignReceiver, testProperties);
        assignReceiver.setStringProperty("CONTROL_TYPE", "ASSIGN_ROLE");
View Full Code Here

TOP

Related Classes of org.apache.qpid.util.ConversationFactory

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.