295 private final static String notifName =
296 "javax.management.Notification";
297
298 private final static String[] diagFramNotifTypes = {
299 "jmx.mbean.info.changed"
300 };
301
302 private MBeanNotificationInfo[] notifInfo = null;
303
304 @Override
305 public MBeanNotificationInfo[] getNotificationInfo() {
306 synchronized (this) {
307 if (notifInfo == null) {
308 notifInfo = new MBeanNotificationInfo[1];
309 notifInfo[0] =
310 new MBeanNotificationInfo(diagFramNotifTypes,
311 notifName,
312 "Diagnostic Framework Notification");
313 }
314 }
315 return notifInfo;
316 }
317
318 private static long seqNumber = 0;
319 private static long getNextSeqNumber() {
320 return ++seqNumber;
321 }
322
323 private void createDiagnosticFrameworkNotification() {
324
325 if (!hasListeners()) {
326 return;
327 }
328 ObjectName on = null;
329 try {
330 on = ObjectName.getInstance(ManagementFactoryHelper.HOTSPOT_DIAGNOSTIC_COMMAND_MBEAN_NAME);
331 } catch (MalformedObjectNameException e) { }
332 Notification notif = new Notification("jmx.mbean.info.changed",
333 on,
334 getNextSeqNumber());
335 notif.setUserData(getMBeanInfo());
|
295 private final static String notifName =
296 "javax.management.Notification";
297
298 private final static String[] diagFramNotifTypes = {
299 "jmx.mbean.info.changed"
300 };
301
302 private MBeanNotificationInfo[] notifInfo = null;
303
304 @Override
305 public MBeanNotificationInfo[] getNotificationInfo() {
306 synchronized (this) {
307 if (notifInfo == null) {
308 notifInfo = new MBeanNotificationInfo[1];
309 notifInfo[0] =
310 new MBeanNotificationInfo(diagFramNotifTypes,
311 notifName,
312 "Diagnostic Framework Notification");
313 }
314 }
315 return notifInfo.clone();
316 }
317
318 private static long seqNumber = 0;
319 private static long getNextSeqNumber() {
320 return ++seqNumber;
321 }
322
323 private void createDiagnosticFrameworkNotification() {
324
325 if (!hasListeners()) {
326 return;
327 }
328 ObjectName on = null;
329 try {
330 on = ObjectName.getInstance(ManagementFactoryHelper.HOTSPOT_DIAGNOSTIC_COMMAND_MBEAN_NAME);
331 } catch (MalformedObjectNameException e) { }
332 Notification notif = new Notification("jmx.mbean.info.changed",
333 on,
334 getNextSeqNumber());
335 notif.setUserData(getMBeanInfo());
|