Package javax.management

Examples of javax.management.Notification


   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


    * source, sequenceNumber, timeStamp
    * will be automatically filled in.
    */  
   public void sendNotification(String type, String message, Object userData)
   {
      Notification n = new Notification(
         type,
         mbeanImpl.getMBeanName(), // source
         mbeanImpl.getSequenceNumber(),
         System.currentTimeMillis(),
         message
      );
      n.setUserData(userData);
     
      // send it away
      mbeanImpl.emitNotification(n);
   }
View Full Code Here

      sbuf.append("</tr>").append("\n");
     
      for (int i = 0; i <  tab.length; i++)
      {
         AlarmTableNotification atn = tab[i];
         Notification n = (Notification)atn.getUserData();
         Object source = AlarmNotification.getEffectiveSource(n);
        
         sbuf.append("<tr>");
         sbuf.append("<td>")
            .append("alarmId: ").append(atn.getAlarmId()).append("<br><br>")
            .append("severity: ").append(AlarmHelper.getSeverityAsString(atn.getSeverity())).append("<br>")
            .append("alarmState: ").append(AlarmHelper.getStateAsString(atn.getAlarmState())).append("<br><br>")
            .append("ackState: ").append(atn.getAckState()).append("<br><br>")
            .append("ackTime: ").append(atn.getAckTime()).append("<br>")
            .append("ackUser: ").append(atn.getAckUser()).append("<br>")
            .append("ackSystem: ").append(atn.getAckSystem()).append("</td>");        
         sbuf.append("<td>")
            .append("source: ").append(source).append("<br>")
            .append("type: ").append(n.getType()).append("<br>")
            .append("timeStamp: ").append(n.getTimeStamp()).append("<br>")
            .append("sequenceNumber: ").append(n.getSequenceNumber()).append("<br><br>")
            .append("message: ").append(substNewLines(n.getMessage())).append("<br><br>")
            .append("userData: ").append(substNewLines(n.getUserData())).append("</td>");
         sbuf.append("</tr>").append("\n");
      }
      sbuf.append("</table>").append("\n");
     
      return sbuf.toString();
View Full Code Here

         if (e instanceof InvocationTargetException)
            throw new NestedRuntimeException(error, ((InvocationTargetException) e).getCause());
         else
            throw new NestedRuntimeException(error, e);
      }
      sendNotification(new Notification(MCF_ATTRIBUTE_CHANGED_NOTIFICATION, getServiceName(),
            getNextNotificationSequenceNumber()));
   }
View Full Code Here

                          new Object[]{},
                          new String[]{});
                  Iterator i = lNotifications.iterator();
                  while (i.hasNext())
                  {
                     Notification lNotification = (Notification) i.next();
                     mClientListener.handleNotification(lNotification,
                             mHandback);
                  }
               }
               catch (Exception e)
View Full Code Here

         if (e instanceof InvocationTargetException)
            throw new NestedRuntimeException(error, ((InvocationTargetException) e).getCause());
         else
            throw new NestedRuntimeException(error, e);
      }
      sendNotification(new Notification(MCF_ATTRIBUTE_CHANGED_NOTIFICATION, getServiceName(),
            getNextNotificationSequenceNumber()));
   }
View Full Code Here

            if (e instanceof InvocationTargetException)
               throw new NestedRuntimeException(error, ((InvocationTargetException) e).getCause());
            else
               throw new NestedRuntimeException(error, e);
         }
         sendNotification(new Notification(MCF_ATTRIBUTE_CHANGED_NOTIFICATION, getServiceName(),
               getNextNotificationSequenceNumber()));
      }
   }
View Full Code Here

      data.key = key;
      data.newReplicants = newReplicants;
      data.newReplicantsViewId = newReplicantsViewId;
      String address = System.getProperty("jboss.bind.address");
      long id = nextSequence();
      Notification msg = new Notification("replicantsChanged", this, id, address);
      msg.setUserData(data);
      log.info("replicantsChanged, "+msg);
      super.sendNotification(msg);
   }
View Full Code Here

      data.key = key;
      data.value = value;
      data.locallyModified = locallyModified;
      String address = System.getProperty("jboss.bind.address");
      long id = nextSequence();
      Notification msg = new Notification(NOTIFY_CHANGE, this, id, address);
      msg.setUserData(data);
      log.debug("valueHasChanged, "+msg);
      super.sendNotification(msg);
   }
View Full Code Here

      data.key = key;
      data.value = previousContent;
      data.locallyModified = locallyModified;
      String address = System.getProperty("jboss.bind.address");
      long id = nextSequence();
      Notification msg = new Notification(NOTIFY_REMOVAL, this, id, address);
      msg.setUserData(data);
      log.debug("keyHasBeenRemoved, "+msg);
      super.sendNotification(msg);
   }
View Full Code Here

TOP

Related Classes of javax.management.Notification

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.