Package com.gitblit.fanout

Examples of com.gitblit.fanout.FanoutClient.startSynchronously()


    Thread.sleep(500);

    // restart client
    client.stop();
    Thread.sleep(1000);
    client.startSynchronously();

    // ping and wait for pong
    client.ping();
    Thread.sleep(500);
View Full Code Here


      public void announcement(String channel, String message) {
        announcementsA.put(channel, message);
      }
    });

    clientA.startSynchronously();

    final Map<String, String> announcementsB = new ConcurrentHashMap<String, String>();
    FanoutClient clientB = new FanoutClient("localhost", fanoutPort);
    clientB.addListener(new FanoutAdapter() {
      @Override
View Full Code Here

      @Override
      public void announcement(String channel, String message) {
        announcementsB.put(channel, message);
      }
    });
    clientB.startSynchronously();


    // subscribe clients A and B to the channels
    clientA.subscribe("a");
    clientA.subscribe("b");
View Full Code Here

      @Override
      public void pong(Date timestamp) {
        pongCount.incrementAndGet();
      }
    });
    client.startSynchronously();

    // ping and wait for pong
    client.ping();
    Thread.sleep(500);
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.