Package mx4j.log

Examples of mx4j.log.Logger.trace()


   {
      Logger logger = getLogger();

      if (isActive())
      {
         if (logger.isEnabledFor(Logger.TRACE)) logger.trace("This RMIConnectorServer has already been started");
         return;
      }
      if (isStopped())
      {
         if (logger.isEnabledFor(Logger.TRACE)) logger.trace("This RMIConnectorServer has already been stopped");
View Full Code Here


      Logger logger = getLogger();
      if (logger.isEnabledFor(Logger.TRACE)) logger.trace("Removing notification listener: " + listener);

      int removed = removeNotificationListenerImpl(listener, null, null);

      if (logger.isEnabledFor(Logger.TRACE)) logger.trace(removed + " notification listener(s) removed successfully from " + this);
   }

   public void removeNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) throws ListenerNotFoundException
   {
      Logger logger = getLogger();
View Full Code Here

         if (logger.isEnabledFor(Logger.TRACE)) logger.trace("This RMIConnectorServer has already been started");
         return;
      }
      if (isStopped())
      {
         if (logger.isEnabledFor(Logger.TRACE)) logger.trace("This RMIConnectorServer has already been stopped");
         throw new IOException("This RMIConnectorServer has already been stopped");
      }

      MBeanServer server = getMBeanServer();
      if (server == null) throw new IllegalStateException("This RMIConnectorServer is not attached to an MBeanServer");
View Full Code Here

   }

   public void removeNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) throws ListenerNotFoundException
   {
      Logger logger = getLogger();
      if (logger.isEnabledFor(Logger.TRACE)) logger.trace("Removing notification listener: " + listener + ", filter: " + filter + ", handback: " + handback);

      // Normalize the arguments if necessary
      if (filter == null) filter = NULL_FILTER;
      if (handback == null) handback = NULL_HANDBACK;
View Full Code Here

      if (filter == null) filter = NULL_FILTER;
      if (handback == null) handback = NULL_HANDBACK;

      int removed = removeNotificationListenerImpl(listener, filter, handback);

      if (logger.isEnabledFor(Logger.TRACE)) logger.trace(removed + " notification listener(s) removed successfully from " + this);
   }

   private int removeNotificationListenerImpl(NotificationListener listener, NotificationFilter filter, Object handback) throws ListenerNotFoundException
   {
      Logger logger = getLogger();
View Full Code Here

   private int removeNotificationListenerImpl(NotificationListener listener, NotificationFilter filter, Object handback) throws ListenerNotFoundException
   {
      Logger logger = getLogger();
      synchronized (this)
      {
         if (logger.isEnabledFor(Logger.TRACE)) logger.trace("Listeners for " + this + " are: " + m_listeners);

         ArrayList pairs = (ArrayList)m_listeners.get(listener);

         if (pairs == null) throw new ListenerNotFoundException("NotificationListener " + listener + " not found");
View Full Code Here

      }

      // Loop over all listeners
      Iterator i = listeners.keySet().iterator();

      if (i.hasNext() && trace) logger.trace("Sending notifications from " + this);

      while (i.hasNext())
      {
         NotificationListener listener = (NotificationListener)i.next();
         if (trace) logger.trace("\tListener is: " + listener);
View Full Code Here

      if (i.hasNext() && trace) logger.trace("Sending notifications from " + this);

      while (i.hasNext())
      {
         NotificationListener listener = (NotificationListener)i.next();
         if (trace) logger.trace("\tListener is: " + listener);

         // Clone again the pairs for this listener.
         // I freezed the listeners with the first clone, if someone removes a pair
         // in the middle of notifications I don't care: here I clone the actual pairs
         ArrayList pairs = null;
View Full Code Here

         {
            pairs = (ArrayList)listeners.get(listener);
            pairs = (ArrayList)pairs.clone();
         }

         if (trace) logger.trace("\tFilters - Handback for this listener: " + pairs);

         // Loop over the same listener that registered many times with different filter / handbacks
         for (int j = 0; j < pairs.size(); ++j)
         {
            FilterHandbackPair pair = (FilterHandbackPair)pairs.get(j);
View Full Code Here

            {
               if (info) logger.info("Throwable caught from isNotificationEnabled", x);
               // And go on
            }

            if (trace) logger.trace("\t\tFilter is: " + filter + ", enabled: " + enabled);

            if (enabled)
            {
               if (trace)
               {
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.