Examples of AttributeChangeNotification


Examples of br.gov.frameworkdemoiselle.management.AttributeChangeNotification

          // Manda uma notificação de mudança de atributo
          NotificationManager notificationManager = Beans.getReference(NotificationManager.class);
          Class<? extends Object> attributeType = newValue != null ? newValue.getClass() : null;

          AttributeChangeNotification notification = new AttributeChangeNotification(bundle.getString(
              "management-notification-attribute-changed", propertyName, managedType.getType()
                  .getCanonicalName()), propertyName, attributeType, oldValue, newValue);
          notificationManager.sendNotification(notification);

        } catch (ConstraintViolationException ce) {
View Full Code Here

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

Examples of javax.management.AttributeChangeNotification

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

Examples of javax.management.AttributeChangeNotification

    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

Examples of javax.management.AttributeChangeNotification

   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

Examples of javax.management.AttributeChangeNotification

      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

Examples of javax.management.AttributeChangeNotification

   {
      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

Examples of javax.management.AttributeChangeNotification

     
      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

Examples of javax.management.AttributeChangeNotification

        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

Examples of javax.management.AttributeChangeNotification

    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
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.