Package javax.management

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


        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

        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

            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

  }
 
  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

         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

        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

        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

     * @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

        else if (oldValue.getValue() != null)
            type = oldValue.getValue().getClass().getName();
        else
            return// Old and new are both null == no change

        AttributeChangeNotification notification =
            new AttributeChangeNotification
            (this, 1, System.currentTimeMillis(),
             "Attribute value has changed",
             oldValue.getName(), type,
             oldValue.getValue(), newValue.getValue());
        sendAttributeChangeNotification(notification);
View Full Code Here

TOP

Related Classes of javax.management.AttributeChangeNotification

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.