Package mx4j.log

Examples of mx4j.log.Logger.debug()


      if (!isModelMBeanInfoValid(modelMBeanInfo)) throw new RuntimeOperationsException(new IllegalArgumentException("ModelMBeanInfo is invalid"));

      m_modelMBeanInfo = new ModelMBeanInfoSupport(modelMBeanInfo);

      Logger logger = getLogger();
      if (logger.isEnabledFor(Logger.DEBUG)) logger.debug("ModelMBeanInfo successfully set to: " + m_modelMBeanInfo);
   }

   private boolean isModelMBeanInfoValid(ModelMBeanInfo info)
   {
      if (info == null || info.getClassName() == null) return false;
View Full Code Here


   public void setManagedResource(Object resource, String resourceType) throws MBeanException, RuntimeOperationsException, InstanceNotFoundException, InvalidTargetObjectTypeException
   {
      if (!isResourceTypeSupported(resourceType)) throw new InvalidTargetObjectTypeException(resourceType);

      Logger logger = getLogger();
      if (logger.isEnabledFor(Logger.DEBUG)) logger.debug("Setting managed resource to be: " + resource);
      m_managedResource = resource;
   }

   private boolean isResourceTypeSupported(String resourceType)
   {
View Full Code Here

      }

      getAttributeChangeBroadcaster().addNotificationListener(listener, filter, handback);

      Logger logger = getLogger();
      if (logger.isEnabledFor(Logger.DEBUG)) logger.debug("Listener " + listener + " for attribute " + attributeName + " added successfully, handback is " + handback);
   }

   public void addNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) throws IllegalArgumentException
   {
      if (listener == null) throw new IllegalArgumentException("listener cannot be null");
View Full Code Here

      }

      getAttributeChangeBroadcaster().removeNotificationListener(listener, filter, handback);

      Logger logger = getLogger();
      if (logger.isEnabledFor(Logger.DEBUG)) logger.debug("Listener " + listener + " for attribute " + attributeName + " removed successfully, handback is " + handback);
   }

   public void removeNotificationListener(NotificationListener listener) throws RuntimeOperationsException, ListenerNotFoundException
   {
      m_generalBroadcaster.removeNotificationListener(listener);
View Full Code Here

      if (notification == null) throw new RuntimeOperationsException(new IllegalArgumentException("Notification cannot be null"));

      getAttributeChangeBroadcaster().sendNotification(notification);

      Logger modelMBeanLogger = getModelMBeanLogger(notification.getType());
      if (modelMBeanLogger != null) if (modelMBeanLogger.isEnabledFor(Logger.DEBUG)) modelMBeanLogger.debug("ModelMBean log: " + new Date() + " - " + notification);

      Logger logger = getLogger();
      if (logger.isEnabledFor(Logger.DEBUG)) logger.debug("Attribute change notification " + notification + " sent");
   }
View Full Code Here

      Logger modelMBeanLogger = getModelMBeanLogger(notification.getType());
      if (modelMBeanLogger != null) if (modelMBeanLogger.isEnabledFor(Logger.DEBUG)) modelMBeanLogger.debug("ModelMBean log: " + new Date() + " - " + notification);

      Logger logger = getLogger();
      if (logger.isEnabledFor(Logger.DEBUG)) logger.debug("Attribute change notification " + notification + " sent");
   }

   public void sendNotification(String message) throws MBeanException, RuntimeOperationsException
   {
      if (message == null) throw new RuntimeOperationsException(new IllegalArgumentException("message is null"));
View Full Code Here

      Logger logger = getLogger();

      // I want the real info, not its clone
      ModelMBeanInfo info = getModelMBeanInfo();
      if (info == null) throw new AttributeNotFoundException("ModelMBeanInfo is null");
      if (logger.isEnabledFor(Logger.DEBUG)) logger.debug("ModelMBeanInfo is: " + info);

      // This is a clone, we use it read only
      ModelMBeanAttributeInfo attrInfo = info.getAttribute(attribute);
      if (attrInfo == null) throw new AttributeNotFoundException("Cannot find ModelMBeanAttributeInfo for attribute " + attribute);
      if (logger.isEnabledFor(Logger.DEBUG)) logger.debug("Attribute info is: " + attrInfo);
View Full Code Here

      if (logger.isEnabledFor(Logger.DEBUG)) logger.debug("ModelMBeanInfo is: " + info);

      // This is a clone, we use it read only
      ModelMBeanAttributeInfo attrInfo = info.getAttribute(attribute);
      if (attrInfo == null) throw new AttributeNotFoundException("Cannot find ModelMBeanAttributeInfo for attribute " + attribute);
      if (logger.isEnabledFor(Logger.DEBUG)) logger.debug("Attribute info is: " + attrInfo);
      if (!attrInfo.isReadable()) throw new AttributeNotFoundException("Attribute " + attribute + " is not readable");

      // This returns a clone of the mbean descriptor, we use it read only
      Descriptor mbeanDescriptor = info.getMBeanDescriptor();
      if (mbeanDescriptor == null) throw new AttributeNotFoundException("MBean descriptor cannot be null");
View Full Code Here

      if (!attrInfo.isReadable()) throw new AttributeNotFoundException("Attribute " + attribute + " is not readable");

      // This returns a clone of the mbean descriptor, we use it read only
      Descriptor mbeanDescriptor = info.getMBeanDescriptor();
      if (mbeanDescriptor == null) throw new AttributeNotFoundException("MBean descriptor cannot be null");
      if (logger.isEnabledFor(Logger.DEBUG)) logger.debug("MBean descriptor is: " + mbeanDescriptor);

      // This descriptor is a clone
      Descriptor attributeDescriptor = attrInfo.getDescriptor();
      if (attributeDescriptor == null) throw new AttributeNotFoundException("Attribute descriptor for attribute " + attribute + " cannot be null");
      if (logger.isEnabledFor(Logger.DEBUG)) logger.debug("Attribute descriptor is: " + attributeDescriptor);
View Full Code Here

      if (logger.isEnabledFor(Logger.DEBUG)) logger.debug("MBean descriptor is: " + mbeanDescriptor);

      // This descriptor is a clone
      Descriptor attributeDescriptor = attrInfo.getDescriptor();
      if (attributeDescriptor == null) throw new AttributeNotFoundException("Attribute descriptor for attribute " + attribute + " cannot be null");
      if (logger.isEnabledFor(Logger.DEBUG)) logger.debug("Attribute descriptor is: " + attributeDescriptor);

      Object returnValue = null;

      String lastUpdateField = "lastUpdatedTimeStamp";
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.