/** * Create a listener registration * * @param name the object name to use as the notifiation source * @param broadcaster the notification broadcaster * @param listener the notification listener * @param filter the notification filter * @param handback the handback object a */ public MBeanServerListenerRegistration(ObjectName name, NotificationBroadcaster broadcaster, NotificationListener listener, NotificationFilter filter, Object handback) { super(listener, filter, handback); proxy = (NotificationListener) NotificationListenerProxy.newInstance(name, listener); this.broadcaster = broadcaster; this.filterProxy = (filter==null) ? null : new NotificationFilterProxy(name,filter); broadcaster.addNotificationListener(proxy, filterProxy, handback); }
/** * Create a listener registration * * @param name the object name to use as the notifiation source * @param broadcaster the notification broadcaster * @param listener the notification listener * @param filter the notification filter * @param handback the handback object a */ public MBeanServerListenerRegistration(ObjectName name, NotificationBroadcaster broadcaster, NotificationListener listener, NotificationFilter filter, Object handback) { super(listener, filter, handback); proxy = (NotificationListener) NotificationListenerProxy.newInstance(name, listener); this.broadcaster = broadcaster; this.filterProxy = (filter==null) ? null : new NotificationFilterProxy(name,filter); broadcaster.addNotificationListener(proxy, filterProxy, handback); }