Package javax.management

Examples of javax.management.AttributeChangeNotification


   public void sendNotification(NotificationBroadcasterSupport source,
          String msg, String attributeName,
          String attributeType, Object oldValue, Object newValue) {
      // Avoid any log.warning or log.severe to prevent looping alert events
      if (isJmxActivated()) {
         Notification n = new AttributeChangeNotification(source,
            sequenceNumber++,
            System.currentTimeMillis(),
            msg,
            attributeName,
            attributeType,
View Full Code Here


     * @see de.netseeker.ejoe.jmx.EJServerConfigMBean#stopEJServer()
     */
    public void stopEJServer()
    {
        this._ejServer.stop();
        Notification n = new AttributeChangeNotification( this, _sequenceNumber++, System.currentTimeMillis(),
                                                          "Running state changed", "Running", "boolean", Boolean.TRUE,
                                                          Boolean.FALSE );
        sendNotification( n );
    }
View Full Code Here

    public void startEJServer()
    {
        try
        {
            this._ejServer.start();
            Notification n = new AttributeChangeNotification( this, _sequenceNumber++, System.currentTimeMillis(),
                                                              "Running state changed", "Running", "boolean",
                                                              Boolean.FALSE, Boolean.TRUE );
            sendNotification( n );
        }
        catch ( IOException e )
View Full Code Here

   public void sendAttributeChangeNotification(
      String type, String message, Object userData,
      String attributeName, String attributeType,
      Object oldValue, Object newValue)
   {
      Notification n = new AttributeChangeNotification(
         mbeanImpl.getMBeanName(), // source
         mbeanImpl.getSequenceNumber(),
         System.currentTimeMillis(),
         message,
         attributeName,
         attributeType,
         oldValue,
         newValue
      );
      n.setUserData(userData);
     
      // send it away
      mbeanImpl.emitNotification(n);
   }
View Full Code Here

      public void handleNotification (Notification notification, java.lang.Object handback)
      {
         if (notification instanceof AttributeChangeNotification)
         {
            AttributeChangeNotification notif = (AttributeChangeNotification) notification;
            int value = ((Integer)notif.getNewValue()).intValue ();

            // Start management is handled by the ProxyFactoryHA, not here
            if (value == ServiceMBean.STOPPING)
            {
               containerIsAboutToStop ();
View Full Code Here

   {
      public void handleNotification (Notification notification, Object handback)
      {
         if (notification instanceof AttributeChangeNotification)
         {
            AttributeChangeNotification notif = (AttributeChangeNotification) notification;
            state = ((Integer)notif.getNewValue()).intValue();
           
            if (state == ServiceMBean.STARTED)
            {
               log.debug ("Started: enabling remote access to mbean " + getTargetName());
               containerIsFullyStarted ();
View Full Code Here

     
      public void handleNotification (Notification notification, java.lang.Object handback)
      {
         if (notification instanceof AttributeChangeNotification)
         {
            AttributeChangeNotification notif = (AttributeChangeNotification) notification;
            int value = ((Integer)notif.getNewValue()).intValue ();
           
            if (value == ServiceMBean.STARTED)
            {
               log.debug ("Container fully started: enabling HA-RMI access to bean");             
               containerIsFullyStarted ();
View Full Code Here

        if ((newValue == null  && oldValue == null)
            || (newValue != null  && newValue.equals(oldValue))) {
            return;
        }
        m_sequenceNumber++;
        Notification notification = new AttributeChangeNotification(this,
            m_sequenceNumber, timeStamp, msg, attributeName, attributeType,
            oldValue, newValue);
        sendNotification(notification);
        m_instanceManager.getFactory().getLogger().log(Logger.INFO,
            "Notification sent");
View Full Code Here

    private void updateQueueMBean(QueueStatusEvent e) {
        QueueMBeanHolder queueMBeanHolder = queues.get(e.getQueue().getName());
        if (queueMBeanHolder != null) {
            String[] oldQueue = getQueueNames();
            names = null;
            this.sendNotification(new AttributeChangeNotification(this,
                    sequence.incrementAndGet(), System.currentTimeMillis(),
                    "Queue " + e.getQueue().getName() + " updated ",
                    "queueNames", "String[]", oldQueue, getQueueNames()));
        }
    }
View Full Code Here

    private void addAndNotify(Queue queue) {
        String[] oldQueue = getQueueNames();
        QueueMBeanHolder queueMBeanHolder = add(queue);
        names = null;
        this.sendNotification(new AttributeChangeNotification(this, sequence
                .incrementAndGet(), System.currentTimeMillis(), "Queue "
                + queueMBeanHolder.name + " added ", "queueNames", "String[]",
                oldQueue, getQueueNames()));
    }
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.