Examples of subscribe()


Examples of com.sun.grid.jgdi.EventClient.subscribe()

            try {
                System.out.println("Successfully connected to " + url);

                EventClient evc = JGDIFactory.createEventClient(url, 0);

                evc.subscribe(EventTypeEnum.CheckpointAdd);
                evc.subscribe(EventTypeEnum.CheckpointMod);
                evc.subscribe(EventTypeEnum.CheckpointDel);

                evc.commit();
View Full Code Here

Examples of com.taobao.metamorphosis.client.consumer.MessageConsumer.subscribe()

        // consumer group
        final String group = "meta-example";
        // create consumer,ǿ�ҽ���ʹ�õ���
        final MessageConsumer consumer = sessionFactory.createBroadcastConsumer(new ConsumerConfig(group));
        // subscribe topic
        consumer.subscribe(topic, 1024 * 1024, new MessageListener() {

            @Override
            public void recieveMessages(final Message message) {
                System.out.println("Receive message " + new String(message.getData()));
            }
View Full Code Here

Examples of com.taobao.metaq.client.MetaPushConsumer.subscribe()

    }
       
        String instanceName = groupId +"@" +  JStormUtils.process_pid();
    consumer.setInstanceName(instanceName);
    consumer.setConsumeFromWhere(ConsumeFromWhere.CONSUME_FROM_LAST_OFFSET);
    consumer.subscribe(config.getTopic(), config.getSubExpress());
    consumer.registerMessageListener(listener);
   
    consumer.setPullThresholdForQueue(config.getQueueSize());
    consumer.setConsumeMessageBatchMaxSize(config.getSendBatchSize());
    consumer.setPullBatchSize(config.getPullBatchSize());
View Full Code Here

Examples of dao.DaoUser.subscribe()

  @Override
  public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    response.setContentType("html");
    DaoUser dao = new DaoUser();
    User user = dao.subscribe(request.getParameter("mail"), request.getParameter("pseudo"), request.getParameter("password"));
    if(user != null) {
      request.getSession().setAttribute("user", user);
    }
    else {
      response.setStatus(599);
View Full Code Here

Examples of de.zib.scalaris.PubSub.subscribe()

        try {
            System.out.println("  creating object...");
            final PubSub sc = new PubSub();
            System.out
                    .println("    `void subscribe(OtpErlangString, OtpErlangString)`...");
            sc.subscribe(otpTopic, otpURL);
            System.out.println("      subscribe(" + otpTopic.stringValue()
                    + ", " + otpURL.stringValue() + ") succeeded");
        } catch (final ConnectionException e) {
            System.out.println("      subscribe(" + otpTopic.stringValue()
                    + ", " + otpURL.stringValue() + ") failed: "
View Full Code Here

Examples of dojox.cometd.Channel.subscribe()

        this.bayeux = bayeux;

        // At this point BayeuxClient is fully initialized so it is safe to
        // allow other classes to see and use us.
        Channel channel = bayeux.getChannel("/dwr", true);
        channel.subscribe(client);
    }

    /* (non-Javadoc)
     * @see dojox.cometd.MessageListener#deliver(dojox.cometd.Client, dojox.cometd.Client, dojox.cometd.Message)
     */
 
View Full Code Here

Examples of gov.nasa.arc.mct.platform.spi.SubscriptionManager.subscribe()

                activeFeeds.put(feed, feed.getTimeService().getCurrentTime());
            }
           
            assert newlyAddedSubscriptionIds.size() == newSubscriptions.size();
            if (!newlyAddedSubscriptionIds.isEmpty()) {
               manager.subscribe(newlyAddedSubscriptionIds.toArray(new String[newlyAddedSubscriptionIds.size()]));
            }
           
            activeSubscriptions = requiredSubscriptions;
        } else {
            LOGGER.warn("subscription manager not available, subscriptions not updated");
View Full Code Here

Examples of net.engio.mbassy.bus.MBassador.subscribe()

   * @throws Exception
   ************************************************************************/
  @Test
  public void testSimpleStringCondition() throws Exception {
    MBassador bus = createBus(SyncAsync());
    bus.subscribe(new ConditionalMessageListener());

    TestEvent message = new TestEvent("TEST", 0);
    bus.publish(message);

    assertTrue(message.wasHandledBy("handleTypeMessage", "handleEnvelopedMessage"));
View Full Code Here

Examples of net.engio.mbassy.bus.common.IMessageBus.subscribe()

                .setNumberOfMessageDispatchers(6);
        IMessageBus bus = createBus(config);
        for(int i = 0; i < numberOfListeners; i++){
            SynchronizedWithSynchronousDelivery handler = new SynchronizedWithSynchronousDelivery();
            handlers.add(handler);
            bus.subscribe(handler);
        }

        MessagePublication publication = null;
        for(int i = 0; i < numberOfMessages; i++){
           publication =  bus.post(new Object()).asynchronously();
View Full Code Here

Examples of net.ser1.stomp.Client.subscribe()

            System.out.println("Connected to broker");
            Map header = new HashMap();
            header.put("transformation", "jms-object-xml");
            header.put("reply-to", "/queue/app.data.response");
            System.out.println("Subscribe for replies to command");
            c.subscribe("/queue/app.data.response", new Listener() {
                @Override
                public void message(Map map, String string) {
                    System.out.println("STOMP client receives something...");
                    System.out.println(string);
                }
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.