1 22 package org.jboss.mx.notification; 23 24 import javax.management.NotificationBroadcaster ; 25 import javax.management.NotificationFilter ; 26 import javax.management.NotificationListener ; 27 import javax.management.ObjectName ; 28 29 39 public class MBeanServerListenerRegistrationFactory 40 implements ListenerRegistrationFactory 41 { 42 45 private ObjectName name; 46 47 50 private NotificationBroadcaster broadcaster; 51 52 59 public MBeanServerListenerRegistrationFactory(ObjectName name, NotificationBroadcaster broadcaster) 60 { 61 if (name == null) 62 throw new IllegalArgumentException ("Null name"); 63 this.name = name; 64 this.broadcaster = broadcaster; 65 } 66 67 public ListenerRegistration create(NotificationListener listener, 68 NotificationFilter filter, 69 Object handback) 70 { 71 return new MBeanServerListenerRegistration(name, broadcaster, listener, filter, handback); 72 } 73 } 74 | Popular Tags |