Package org.apache.airavata.wsmg.client

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


      return;
    }

    try {

      subscriptionId = client.subscribe(consumerEprs[0], topic, null);
      System.out.println(getName() + "got the subscription id :"
          + subscriptionId);

    } catch (MsgBrokerClientException e) {
View Full Code Here


        NotificationSender sender = new NotificationSender(brokerLocation, topic);
        // Creating a messagebox
        EndpointReference msgBoxEpr = brokerClient.createPullMsgBox(configurations.getProperty(ConfigKeys.MSGBOX_SERVICE_URL));

        // subscribing to the above created messsage box with configured topic
        String subscriptionID = brokerClient.subscribe(msgBoxEpr.getAddress(), topic, null);


        //Start the messagePuller to pull messages from newly created messagebox
        MessagePuller puller = brokerClient.startPullingEventsFromMsgBox(msgBoxEpr, new Listener(), 1000L, 2000L);
View Full Code Here

        int consumerPort = TestUtilServer.getAvailablePort();

            String[] consumerEPRs = brokerClient.startConsumerService(consumerPort, this);
        // subscribing to the above created messsage box with configured topic
        String subscriptionID = brokerClient.subscribe(consumerEPRs[0], topic, null);

        sender.workflowStarted("Workflow Started");

        //Here we simply assume the workflow invocation is the invoke of the subscribe operation of EventingService and result
        // Is considered as the subscriptionID got from subscribe operation
View Full Code Here

            assertTrue(consumerEPRs.length > 0);

            String topic = "WseRoundTripTestTopic";

            String subscriptionID = wseMsgBrokerClient.subscribe(consumerEPRs[0], topic, null);
            System.out.println("topic sub id = " + subscriptionID);

            try {
                wseMsgBrokerClient.publish(topic, msg);
                wseMsgBrokerClient.publish(topic, AXIOMUtil.stringToOM("<foo><bar>Test</bar></foo>"));
View Full Code Here

    client.init(brokerLocation);
    System.out.println("subscribing with xpath expression: "
        + xpathExpression);

    // create a topic subscription.
    String subscriptionId = client.subscribe(consumerLocation, null,
        xpathExpression);

    System.out.println("xpath subscription id : " + subscriptionId);
  }
}
View Full Code Here

      return;
    }

    try {

      subscriptionId = client.subscribe(consumerEprs[0], null,
          xpathExpression);
      System.out.println(getName() + "got the subscription id :"
          + subscriptionId);

    } catch (MsgBrokerClientException e) {
View Full Code Here

        "http://localhost:2222/axis2/services/ConsumerService");

    WseMsgBrokerClient client = new WseMsgBrokerClient();
    client.init(brokerLocation);
    // create a topic subscription.
    String subscriptionId = client.subscribe(consumerLocation,
        topicExpression, null);

    System.out.println("subscription id : " + subscriptionId);
  }
}
View Full Code Here

        int consumerPort = TestUtilServer.getAvailablePort();

            String[] consumerEPRs = brokerClient.startConsumerService(consumerPort, this);
        // subscribing to the above created messsage box with configured topic
        String subscriptionID = brokerClient.subscribe(consumerEPRs[0], topic, null);

        sender.workflowStarted("Workflow Started");

        //Here we simply assume the workflow invocation is the invoke of the subscribe operation of EventingService and result
        // Is considered as the subscriptionID got from subscribe operation
View Full Code Here

        NotificationSender sender = new NotificationSender(brokerLocation, topic);
        // Creating a messagebox
        EndpointReference msgBoxEpr = brokerClient.createPullMsgBox(configurations.getProperty(ConfigKeys.MSGBOX_SERVICE_URL));

        // subscribing to the above created messsage box with configured topic
        String subscriptionID = brokerClient.subscribe(msgBoxEpr.getAddress(), topic, null);


        //Start the messagePuller to pull messages from newly created messagebox
        MessagePuller puller = brokerClient.startPullingEventsFromMsgBox(msgBoxEpr, new Listener(), 1000L, 2000L);
View Full Code Here

        WseMsgBrokerClient wseClient = new WseMsgBrokerClient();
        wseClient.init(brokerLoc);
        logger.debug("Starting Subscription for topic [" + topic + "]at the broker location:" + brokerLoc);
        ConsumerServer xs = new ConsumerServer(consumerServerPort, this);
        xs.start();
        String subscriptionId = wseClient.subscribe(xs.getConsumerServiceEPRs()[0], topic, null);
        logger.info("The consumer server started on EPR" + xs.getConsumerServiceEPRs()[0]);
        Subscription subscription = new Subscription(xs, subscriptionId, topic, callback, brokerLoc);
        return subscription;
    }
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.