Examples of NotificationListener


Examples of javax.management.NotificationListener

    }

    public void removeNotificationListener(ObjectName name,
                                           ObjectName listener)
            throws InstanceNotFoundException, ListenerNotFoundException {
        NotificationListener instance = getListener(listener);

        if (MBEANSERVER_LOGGER.isLoggable(Level.FINER)) {
            MBEANSERVER_LOGGER.logp(Level.FINER,
                    DefaultMBeanServerInterceptor.class.getName(),
                    "removeNotificationListener",
View Full Code Here

Examples of ke.go.moh.oec.reception.controller.NotificationListener

        initialize();
    }

    private void initialize() {
        this.getWork();
        new Thread(new NotificationListener(this)).start();
    }
View Full Code Here

Examples of org.apache.interop.smgr.NotificationListener

   */
  public void onConnect() {
   
    // Start TCP Listener and A worker that will deliver received notifications
    m_messageWorker = new MessageWorker(this,m_buffer);
    m_listener = new NotificationListener(LISTENER_PORT,60000,m_buffer);
    try {
      m_messageWorker.start();
      m_listener.start();
    } catch (IOException e) {
      // TODO Auto-generated catch block
View Full Code Here

Examples of org.apache.webdav.lib.NotificationListener

             
              private boolean success;
             
                public void run() {
                  success = true;
                    listener = new NotificationListener(host, port, repositoryHost, repositoryPort, protocol, credentials,
                        repositoryDomain, pollInterval, udp);

                    success = listener.subscribe("Update", uri, depth, lifetime, notificationDelay, contentSubscriber, credentials);
                    success = listener.subscribe("Update/newmember", uri, depth, lifetime, notificationDelay, structureSubscriber, credentials);
                    success = listener.subscribe("Delete", uri, depth, lifetime, notificationDelay, structureSubscriber, credentials);
View Full Code Here

Examples of org.hornetq.core.server.management.NotificationListener

         verifyReceiveAllInRange(true, 0, 10, 0);

         closeAllConsumers();

         final CountDownLatch latch = new CountDownLatch(4);
         NotificationListener listener = new NotificationListener()
         {
            public void onNotification(final Notification notification)
            {
               if (NotificationType.BINDING_REMOVED == notification.getType())
               {
View Full Code Here

Examples of org.mule.munit.runner.mule.result.notification.NotificationListener

     */
    @org.junit.Test
    public void callNotificationAndExecuteTestsWhenRun() throws Exception
    {
        MunitTest test = mock(MunitTest.class);
        NotificationListener listener = mock(NotificationListener.class);

        TestResult testResult = new TestResult("testResult");

        when(test.run()).thenReturn(testResult);

View Full Code Here

Examples of org.mule.munit.runner.mule.result.notification.NotificationListener

            out = new ObjectOutputStream(requestSocket.getOutputStream());
            out.flush();

            MunitSuiteRunner runner = new MunitSuiteRunner(resource);

            runner.setNotificationListener(new NotificationListener()
            {

                public void notifyStartOf(MunitTest test)
                {
                    try
View Full Code Here

Examples of org.syncany.operations.watch.NotificationListener

    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);   
      }
    });   
   
    // Start
    notificationListener1.start();
    notificationListener2.start();
   
    notificationListener1.subscribe(randomChannelName);
    notificationListener2.subscribe(randomChannelName);
       
    Thread.sleep(1500); // Let them settle
   
    notificationListener1.announce(randomChannelName, "Message from 1");
    notificationListener2.announce(randomChannelName, "Message from 2");
   
    for (int i = 0; i < 100; i++) {
      Thread.sleep(100); // Wait for messages
      if (messagesReceivedBy1.get() == 2 && messagesReceivedBy2.get() == 2) {
        break;
      }
    }
    assertEquals("Different amount of messages received by 1", 2, messagesReceivedBy1.get());
    assertEquals("Different amount of messages received by 2", 2, messagesReceivedBy2.get());

    notificationListener1.stop();
    notificationListener2.stop();
  }
View Full Code Here

Examples of org.tools.ui.notification.NotificationListener

     */
    public void scheduleInfoMessage(String message) {
        // make new notification
        NotificationDialog dlg = NotificationFactory.createInfoNotification(message, frame, Color.white, Color.black);
        // add listener that displays the next notification
        dlg.addNotificationListener(new NotificationListener() {
            @Override
            public void notificationResult(boolean value) {
                // TODO notifications must be non-empty

                // remove ourselves
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.