Package javax.management

Examples of javax.management.ListenerNotFoundException


      ListenerRegistration registration = null;
      synchronized(listeners)
      {
         ArrayList registrations = (ArrayList) listeners.get(listener);
         if (registrations == null)
            throw new ListenerNotFoundException("No registristrations for listener not listener=" + listener +
                                                " filter=" + filter + " handback=" + handback);

         registration = new DefaultListenerRegistration(listener, filter, handback);
         int index = registrations.indexOf(registration);
         if (index == -1)
            throw new ListenerNotFoundException("Listener not found listener=" + listener +
                                                " filter=" + filter + " handback=" + handback);

         HashMap newListeners = (HashMap) listeners.clone();

         registrations = (ArrayList) registrations.clone();
View Full Code Here


   }

   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);
      ((HTTPConnection)getConnection()).removeNotificationListeners(observed, ids, getDelegateSubject());
      notificationHandler.removeNotificationListeners(ids);
   }
View Full Code Here

   }

   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};
      ((HTTPConnection)getConnection()).removeNotificationListeners(observed, ids, getDelegateSubject());
      notificationHandler.removeNotificationListeners(ids);
   }
View Full Code Here

   public void removeNotificationListener(ObjectName observed, NotificationListener listener)
           throws InstanceNotFoundException, ListenerNotFoundException
   {
      if (listener == null)
      {
         throw new ListenerNotFoundException("NotificationListener cannot be null");
      }

      observed = secureObjectName(observed);

      MBeanMetaData metadata = findMBeanMetaData(observed);
View Full Code Here

   public void removeNotificationListener(ObjectName observed, NotificationListener listener, NotificationFilter filter, Object handback)
           throws InstanceNotFoundException, ListenerNotFoundException
   {
      if (listener == null)
      {
         throw new ListenerNotFoundException("NotificationListener cannot be null");
      }

      observed = secureObjectName(observed);

      MBeanMetaData metadata = findMBeanMetaData(observed);
View Full Code Here

   }

   // Not in the spec but needed
   private void removeAttributeChangeNotificationListener(NotificationListener listener, String attributeName, Object handback) throws MBeanException, RuntimeOperationsException, ListenerNotFoundException
   {
      if (listener == null) throw new ListenerNotFoundException("listener is null");
      AttributeChangeNotificationFilter filter = new AttributeChangeNotificationFilter();
      if (attributeName != null)
      {
         if (m_modelMBeanInfo.getAttribute(attributeName) == null) throw new RuntimeOperationsException(new IllegalArgumentException("No attribute named " + attributeName));
         filter.enableAttribute(attributeName);
View Full Code Here

   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

   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

   }

   // Not in the spec but needed
   private void removeAttributeChangeNotificationListener(NotificationListener listener, String attributeName, Object handback) throws MBeanException, RuntimeOperationsException, ListenerNotFoundException
   {
      if (listener == null) throw new ListenerNotFoundException("listener is null");
      AttributeChangeNotificationFilter filter = new AttributeChangeNotificationFilter();
      if (attributeName != null)
      {
         if (m_modelMBeanInfo.getAttribute(attributeName) == null) throw new RuntimeOperationsException(new IllegalArgumentException("No attribute named " + attributeName));
         filter.enableAttribute(attributeName);
View Full Code Here

      return new JMRuntimeException("JMRuntimeException");
   }

   public ListenerNotFoundException createListenerNotFoundException()
   {
      return new ListenerNotFoundException("ListenerNotFoundException");
   }
View Full Code Here

TOP

Related Classes of javax.management.ListenerNotFoundException

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.