1 23 24 package com.sun.enterprise.admin.jmx.remote.server.notification; 25 26 import java.util.logging.Logger ; 27 import javax.management.*; 28 29 import com.sun.enterprise.admin.jmx.remote.notification.NotificationWrapper; 30 import com.sun.enterprise.admin.jmx.remote.DefaultConfiguration; 31 32 39 public class NotificationListenerProxy implements NotificationListener { 40 private String id = null; 41 private ServerNotificationManager mgr = null; 42 private ObjectName objname = null; 43 private Notification notification = null; 44 45 private static final Logger logger = Logger.getLogger( 46 DefaultConfiguration.JMXCONNECTOR_LOGGER); 48 49 public NotificationListenerProxy(ObjectName objname, 50 ServerNotificationManager mgr, 51 String id) { 52 this.objname = objname; 53 this.mgr = mgr; 54 this.id = id; 55 } 56 57 61 public String getId() { 62 return id; 63 } 64 65 66 public NotificationWrapper getNotificationWrapper() { 67 return ( new NotificationWrapper(objname, notification) ); 68 } 69 70 public Notification getNotification() { 71 return notification; 72 } 73 74 public void handleNotification( Notification notification, 75 Object handback) { 76 this.notification = notification; 77 mgr.fireNotification(this); 78 } 79 } 80 | Popular Tags |