Package com.gitblit.fanout

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


    System.out.println(MessageFormat.format("\n\n========================================\nPUBSUB TEST {0}\n========================================\n\n", service.toString()));
    service.startSynchronously();

    final Map<String, String> announcementsA = new ConcurrentHashMap<String, String>();
    FanoutClient clientA = new FanoutClient("localhost", fanoutPort);
    clientA.addListener(new FanoutAdapter() {

      @Override
      public void announcement(String channel, String message) {
        announcementsA.put(channel, message);
      }
View Full Code Here


    clientA.startSynchronously();

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

    System.out.println(MessageFormat.format("\n\n========================================\nDISRUPTION TEST {0}\n========================================\n\n", service.toString()));
    service.startSynchronously();

    final AtomicInteger pongCount = new AtomicInteger(0);
    FanoutClient client = new FanoutClient("localhost", fanoutPort);
    client.addListener(new FanoutAdapter() {
      @Override
      public void pong(Date timestamp) {
        pongCount.incrementAndGet();
      }
    });
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.