1 22 package org.jboss.mx.server; 23 24 import javax.management.Notification ; 25 import javax.management.NotificationListener ; 26 import javax.management.ObjectName ; 27 28 37 public class NotificationListenerProxy 38 implements NotificationListener 39 { 40 42 44 47 private NotificationListener listener; 48 49 52 private ObjectName name; 53 54 56 58 64 public NotificationListenerProxy(ObjectName name, 65 NotificationListener listener) 66 { 67 this.name = name; 68 this.listener = listener; 69 } 70 71 73 75 public void handleNotification(Notification notification, Object handback) 76 { 77 if (notification == null) 78 return; 79 80 notification.setSource(name); 84 listener.handleNotification(notification, handback); 85 } 86 87 89 91 93 } 95 | Popular Tags |