Package org.apache.airavata.wsmg.client

Examples of org.apache.airavata.wsmg.client.WseMsgBrokerClient.publish()


        client.setTimeoutInMilliSeconds(20000L);

        OMElement msg = WorkFlowUtils.reader2OMElement(new StringReader(CommonUtils.WORKFLOW_INITIALIZED_NOTIFICATION));

        for (int i = 0; i < repetition; i++) {
            client.publish("topic", msg);
            Thread.sleep(100);
        }

        Boolean b1 = c1.getQueue().take();
        Boolean b2 = c2.getQueue().take();
View Full Code Here


        client.init(BROKER_URL);

        OMElement msg = WorkFlowUtils.reader2OMElement(new StringReader(CommonUtils.WORKFLOW_INITIALIZED_NOTIFICATION));

        for (int i = 0; i < repetition; i++) {
            client.publish("topic10", msg);
            Thread.sleep(100);
        }

        for (int i = 0; i < repetition; i++) {
            client.publish("topic20", msg);
View Full Code Here

            client.publish("topic10", msg);
            Thread.sleep(100);
        }

        for (int i = 0; i < repetition; i++) {
            client.publish("topic20", msg);
            Thread.sleep(100);
        }

        Boolean b1 = c1.getQueue().take();
        Boolean b2 = c2.getQueue().take();
View Full Code Here

        omMsg.setText("" + (sequence++));

        System.out.println(String.format(
            "producer [%s] sending msg: %s", getName(), omMsg
                .toString()));
        client.publish(topicExpression, omMsg);
        TimeUnit.SECONDS.sleep(timeInterval);
      }

    } catch (InterruptedException e) {
      e.printStackTrace();
View Full Code Here

        WseMsgBrokerClient client = new WseMsgBrokerClient();
        client.init(BROKER_URL);

        OMElement msg = WorkFlowUtils.reader2OMElement(new StringReader(CommonUtils.WORKFLOW_INITIALIZED_NOTIFICATION));

        client.publish(TOPIC, msg);

        System.out.println("Messages published");
        System.out.println("Creating another puller");
        EndpointReference epr = thread.getWsaEndpointReference();
        String subscriptionID = thread.getSubscriptionID();
View Full Code Here

        count++;
        String msg = String.format(msgFormat, count, getName(), uuid
            .toString());
        System.out.println(String.format(
            "producer [%s] sending msg: %s", getName(), msg));
        client.publish(topicExpression, buildMsg(msg));
        TimeUnit.SECONDS.sleep(timeInterval);
      }

    } catch (InterruptedException e) {
      e.printStackTrace();
View Full Code Here

            OMElement testNotification = factory.createOMElement("Test", null);

            testNotification.setText("test event for workflow tracking sample");

            publisher.publish(null, testNotification);
            publisher.publish(null, finalNotificationEl);
        } catch (Exception e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
View Full Code Here

            OMElement testNotification = factory.createOMElement("Test", null);

            testNotification.setText("test event for workflow tracking sample");

            publisher.publish(null, testNotification);
            publisher.publish(null, finalNotificationEl);
        } catch (Exception e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
View Full Code Here

            WseMsgBrokerClient senderApi = new WseMsgBrokerClient();
            senderApi.init(brokerEpr);

            try {

                senderApi.publish(topic, AXIOMUtil.stringToOM(matchingMsg));
                senderApi.publish(topic, AXIOMUtil.stringToOM(unmatchingMsg));

                Thread.sleep(5000);

                assertTrue("topic only reciever should get all messages" + topicOnlyMsgReceiver.getMsgQueue().size(),
View Full Code Here

            senderApi.init(brokerEpr);

            try {

                senderApi.publish(topic, AXIOMUtil.stringToOM(matchingMsg));
                senderApi.publish(topic, AXIOMUtil.stringToOM(unmatchingMsg));

                Thread.sleep(5000);

                assertTrue("topic only reciever should get all messages" + topicOnlyMsgReceiver.getMsgQueue().size(),
                        topicOnlyMsgReceiver.getMsgQueue().size() == 2);
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.