1 25 package org.objectweb.jonas.management; 26 27 import javax.management.NotificationListener ; 29 import javax.management.Notification ; 30 31 34 public class JonasNotificationListener implements NotificationListener { 35 36 public void handleNotification(Notification notification, Object handback) { 38 if (notification instanceof AttributeAddNotification) { 39 System.out.println("JonasNotificationListener received AttributeAddNotification notification"); 40 AttributeAddNotification myNotification = (AttributeAddNotification) notification; 41 System.out.println("AttributeAddNotification"); 42 System.out.println(" attribute = " + myNotification.getAttributeName()); 43 System.out.println(" added value = " + myNotification.getAddedValue()); 44 System.out.println(" handback = " + handback.toString()); 45 } else { 46 System.out.println("JonasNotificationListener received unknown notification"); 47 } 48 } 49 } 50 | Popular Tags |