Examples of NotificationTuple


Examples of org.apache.felix.mosgi.jmx.rmiconnector.mx4j.remote.NotificationTuple

   }

   public void addNotificationListener(ObjectName observed, NotificationListener listener, NotificationFilter filter, Object handback)
           throws InstanceNotFoundException, IOException
   {
      NotificationTuple tuple = new NotificationTuple(observed, listener, filter, handback);
      if (notificationHandler.contains(tuple)) return;

      MarshalledObject f = null;
      try
      {
         f = RMIMarshaller.marshal(filter);
      }
      catch (NotSerializableException x)
      {
         // Invoke the filter on client side
         tuple.setInvokeFilter(true);
      }
      Integer[] ids = connection.addNotificationListeners(new ObjectName[] {observed}, new MarshalledObject[] {f}, new Subject[] {delegate});
      notificationHandler.addNotificationListener(ids[0], tuple);
   }
View Full Code Here

Examples of org.apache.felix.mosgi.jmx.rmiconnector.mx4j.remote.NotificationTuple

   }

   public void removeNotificationListener(ObjectName observed, NotificationListener listener)
           throws InstanceNotFoundException, ListenerNotFoundException, IOException
   {
      Integer[] ids = notificationHandler.getNotificationListeners(new NotificationTuple(observed, listener));
      if (ids == null) throw new ListenerNotFoundException("Could not find listener " + listener);
      connection.removeNotificationListeners(observed, ids, delegate);
      notificationHandler.removeNotificationListeners(ids);
   }
View Full Code Here

Examples of org.apache.felix.mosgi.jmx.rmiconnector.mx4j.remote.NotificationTuple

   }

   public void removeNotificationListener(ObjectName observed, NotificationListener listener, NotificationFilter filter, Object handback)
           throws InstanceNotFoundException, ListenerNotFoundException, IOException
   {
      Integer id = notificationHandler.getNotificationListener(new NotificationTuple(observed, listener, filter, handback));
      if (id == null) throw new ListenerNotFoundException("Could not find listener " + listener + " with filter " + filter + " and handback " + handback);
      Integer[] ids = new Integer[] {id};
      connection.removeNotificationListeners(observed, ids, delegate);
      notificationHandler.removeNotificationListeners(ids);
   }
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.