Examples of subscribe()


Examples of org.activemq.ws.notification.NotificationProducer.Subscribe()

            SubscribeDocument requestDoc = SubscribeDocument.Factory.newInstance();
            Subscribe subscribe = requestDoc.addNewSubscribe();
            subscribe.setTopicExpression( TopicExpressionConverter.toTopicExpression(topic) );
            subscribe.setUseNotify(true);
            subscribe.setConsumerReference(endpointReference);
            SubscribeResponseDocument reponse = p.Subscribe(requestDoc);
        } else {
            UnsubscribeDocument requestDoc = UnsubscribeDocument.Factory.newInstance();
            Unsubscribe unsubscribe = requestDoc.addNewUnsubscribe();           
        }
    }
View Full Code Here

Examples of org.apache.activemq.transport.stomp.StompConnection.subscribe()

        contentExchange.waitForDone();

        StompConnection connection = new StompConnection();
        connection.open(stompUri.getHost(), stompUri.getPort());
        connection.connect("user", "password");
        connection.subscribe( "/queue/test" );

        StompFrame message;
        String allMessageBodies = "";
        try {
            while( true ) {
View Full Code Here

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

        "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

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

            assertTrue(consumerEPRs.length > 0);

            String topic = "/WsntRoundTripTestTopic";

            String topicSubscriptionID = wsntMsgBrokerClient.subscribe(consumerEPRs[0], topic, null);
            System.out.println("topic subscription id: " + topicSubscriptionID);

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

Examples of org.apache.airavata.wsmg.client.amqp.rabbitmq.AMQPBroadcastReceiverImpl.Subscribe()

        MessageConsumer consumer = new MessageConsumer();
        AMQPBroadcastReceiver receiver = new AMQPBroadcastReceiverImpl(properties, consumer);
        System.out.println("Waiting for broadcast messages : \n");

        receiver.Subscribe();
    }

    public static class MessageConsumer implements AMQPCallback {
        public void onMessage(String message) {
            System.out.println("Received : " + message);
View Full Code Here

Examples of org.apache.airavata.wsmg.client.amqp.rabbitmq.AMQPTopicReceiverImpl.Subscribe()

        MessageConsumer consumer = new MessageConsumer();
        AMQPTopicReceiver receiver = new AMQPTopicReceiverImpl(properties, consumer);
        System.out.println("Waiting for topic messages : \n");

        AMQPRoutingKey key = new AMQPRoutingKey("workflowTerminated", "");
        receiver.Subscribe(key);
    }

    public static class MessageConsumer implements AMQPCallback {
        public void onMessage(String message) {
            System.out.println("Received : " + message);
View Full Code Here

Examples of org.apache.cocoon.portal.event.EventManager.subscribe()

     */
    public void initialize() throws Exception {
        EventManager eventManager = null;
        try {
            eventManager = (EventManager) this.manager.lookup(EventManager.ROLE);
            eventManager.subscribe(this);
        } finally {
            this.manager.release(eventManager);
        }
    }

View Full Code Here

Examples of org.apache.cometd.bayeux.Channel.subscribe()

                        new Stock("GOOG", 435.43),
                        new Stock("YHOO", 27.88),
                        new Stock("SPRG", 1015.55), };
                for (Stock s : stocks) {
                    Channel ch = b.getChannel("/stock/"+s.getSymbol(), true);
                    ch.subscribe(c);
                   
                }
                Random r = new Random(System.currentTimeMillis());
                while (run) {
                    for (int j = 0; j < 1; j++) {
View Full Code Here

Examples of org.apache.cxf.wsn.client.NotificationBroker.subscribe()


        // Create a subscription for a Topic on the broker
        NotificationBroker notificationBroker
                = new NotificationBroker("http://localhost:" + wsnPort + "/wsn/NotificationBroker",Email.class);
        Subscription subscription = notificationBroker.subscribe(consumer, topic);

        // Create new email object to send
        Email mail =  new Email("standalone@client.com","you@gotmail.com","This is the standalone client speaking","This thing works!");

        // Send a notification on the Topic
View Full Code Here

Examples of org.apache.hedwig.client.api.Subscriber.subscribe()

    public void testSyncHubSubscribeWithInvalidSubscriberId() throws Exception {
        Client hubClient = new HedwigHubClient(new ClientConfiguration());
        Subscriber hubSubscriber = hubClient.getSubscriber();
        boolean subscribeSuccess = false;
        try {
            hubSubscriber.subscribe(getTopic(0), localSubscriberId, CreateOrAttach.CREATE_OR_ATTACH);
        } catch (InvalidSubscriberIdException e) {
            subscribeSuccess = true;
        } catch (Exception ex) {
            subscribeSuccess = false;
        }
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.