Package org.syncany.operations.watch.NotificationListener

Examples of org.syncany.operations.watch.NotificationListener.NotificationListenerListener


    String randomChannelName = NotificationListenerTest.class.getName() + new Random().nextInt();

    final AtomicInteger messagesReceivedBy1 = new AtomicInteger(0);
    final AtomicInteger messagesReceivedBy2 = new AtomicInteger(0);
   
    final NotificationListener notificationListener1 = new NotificationListener("notify.syncany.org", 8080, new NotificationListenerListener() {     
      @Override
      public void pushNotificationReceived(String channel, String message) {
        logger.log(Level.INFO, "Client 1: pushNotificationReceived(channel = "+channel+", message = "+message+")");
        messagesReceivedBy1.addAndGet(1);
      }
    });
   
    final NotificationListener notificationListener2 = new NotificationListener("notify.syncany.org", 8080, new NotificationListenerListener() {     
      @Override
      public void pushNotificationReceived(String channel, String message) {
        logger.log(Level.INFO, "Client 2: pushNotificationReceived(channel = "+channel+", message = "+message+")");       
        messagesReceivedBy2.addAndGet(1);   
      }
View Full Code Here

TOP

Related Classes of org.syncany.operations.watch.NotificationListener.NotificationListenerListener

Copyright © 2018 www.massapicom. 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.