Examples of AttributeChangeNotification


Examples of javax.management.AttributeChangeNotification

        if (notification == null)
            return (false);
        if (!(notification instanceof AttributeChangeNotification))
            return (false);
        AttributeChangeNotification acn =
            (AttributeChangeNotification) notification;
        if (!AttributeChangeNotification.ATTRIBUTE_CHANGE.equals(acn.getType()))
            return (false);
        synchronized (names) {
            if (names.size() < 1)
                return (true);
            else
                return (names.contains(acn.getAttributeName()));
        }

    }
View Full Code Here

Examples of javax.management.AttributeChangeNotification

        return true;
    }

    public void notifyAttrChange(String attrName, Object newVal, Object oldVal)  {
  sendNotification(
      new AttributeChangeNotification(this, sequenceNumber++, new Date().getTime(),
          "Attribute change", attrName,
                 newVal == null ? "" : newVal.getClass().getName(),
          oldVal, newVal));
 
  Agent agent = Globals.getAgent();
View Full Code Here

Examples of javax.management.AttributeChangeNotification

        return true;
    }

    public void notifyAttrChange(String attrName, Object newVal, Object oldVal)  {
  sendNotification(
      new AttributeChangeNotification(this, sequenceNumber++, new Date().getTime(),
          "Attribute change", attrName, (newVal == null ? "" : newVal.getClass().getName()),
          oldVal, newVal));
    }
View Full Code Here

Examples of javax.management.AttributeChangeNotification

        return true;
    }

    public void notifyAttrChange(String attrName, Object newVal, Object oldVal)  {
  sendNotification(
      new AttributeChangeNotification(this,
      sequenceNumber++,
      new Date().getTime(),
                  "Attribute change", attrName,
                        newVal == null ? "" : newVal.getClass().getName(),
                  oldVal, newVal));
View Full Code Here

Examples of javax.management.AttributeChangeNotification

            echo("\tClassName: " + notification.getClass().getName());
            echo("\tSource: " + notification.getSource());
            echo("\tType: " + notification.getType());
            echo("\tMessage: " + notification.getMessage());
            if (notification instanceof AttributeChangeNotification) {
                AttributeChangeNotification acn =
                    (AttributeChangeNotification) notification;
                echo("\tAttributeName: " + acn.getAttributeName());
                echo("\tAttributeType: " + acn.getAttributeType());
                echo("\tNewValue: " + acn.getNewValue());
                echo("\tOldValue: " + acn.getOldValue());
            }
        }
View Full Code Here

Examples of javax.management.AttributeChangeNotification

  }
 
  protected void sendAttributeChangedMessage( ManagementNotificationEvent event , JMXConfig config ) {
    br.gov.frameworkdemoiselle.management.AttributeChangeNotification demoiselleNotification = (br.gov.frameworkdemoiselle.management.AttributeChangeNotification)event.getNotification();
   
    AttributeChangeNotification n = new AttributeChangeNotification(config.getNotificationMBeanName(), sequenceNumber++
        , System.currentTimeMillis(), demoiselleNotification.getMessage().toString()
        , demoiselleNotification.getAttributeName(), demoiselleNotification.getAttributeType().getSimpleName()
        , demoiselleNotification.getOldValue(), demoiselleNotification.getNewValue());
   
    sendNotification(n);
View Full Code Here

Examples of javax.management.AttributeChangeNotification

         throw new IllegalArgumentException("attribute name mismatch between oldvalue and newvalue");
        
      String attr = oldValue.getName();
      String type = ((ModelMBeanInfo)info).getAttribute(attr).getType();

      AttributeChangeNotification notif = new AttributeChangeNotification(
                                             this,                          // source
                                             ++attrNotifierSequence,        // seq. #
                                             System.currentTimeMillis(),    // time stamp
                                             "" + attr + " changed from " + oldValue + " to " + newValue,
                                             attr, type,                    // name & type
View Full Code Here

Examples of javax.management.AttributeChangeNotification

        if ((oldVal == null && newVal != null) ||
                (oldVal != null && newVal == null) ||
                (oldVal.equals(newVal) == false))
        {
            sendNotification(
                    new AttributeChangeNotification(
                            this,
                            attributeSequence.increment(),
                            System.currentTimeMillis(),
                            event,
                            attribute,
View Full Code Here

Examples of javax.management.AttributeChangeNotification

        if((oldVal == null && newVal != null) ||
                (oldVal != null && newVal == null) ||
                (oldVal.equals(newVal) == false))
        {
            sendNotification(
                    new AttributeChangeNotification(
                            this,
                            attributeSequence.increment(),
                            System.currentTimeMillis(),
                            event,
                            attribute,
View Full Code Here

Examples of javax.management.AttributeChangeNotification

     * @throws RuntimeOperationsException
     */
    public void sendAttributeChangeNotification(Attribute oldAttr, Attribute newAttr) throws MBeanException,
            RuntimeOperationsException {
        if (!oldAttr.equals(newAttr)) {
            AttributeChangeNotification notification = new AttributeChangeNotification(objectName, 1, ((new Date())
                    .getTime()), "AttributeChange", oldAttr.getName(), (((newAttr.getValue()).getClass()).toString()),
                    oldAttr.getValue(), newAttr.getValue());
            sendAttributeChangeNotification(notification);
        }
    }
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.