1 18 19 package org.objectweb.util.monolog.wrapper.javaLog; 20 import javax.management.ListenerNotFoundException ; 21 import javax.management.MBeanNotificationInfo ; 22 import javax.management.NotificationEmitter ; 23 import javax.management.NotificationFilter ; 24 import javax.management.NotificationListener ; 25 26 27 32 public class JMXGenericHandler 33 extends GenericHandler 34 implements NotificationEmitter { 35 36 public JMXGenericHandler() { 37 super(); 38 type = "jmx"; 39 } 40 41 public void addNotificationListener(NotificationListener listener, 42 NotificationFilter filter, 43 Object handback) 44 throws IllegalArgumentException { 45 ((NotificationEmitter )handler).addNotificationListener( listener, filter, handback ); 46 } 47 48 public void removeNotificationListener( NotificationListener listener ) 49 throws ListenerNotFoundException { 50 ((NotificationEmitter )handler).removeNotificationListener( listener ); 51 } 52 53 public void removeNotificationListener( NotificationListener listener, 54 NotificationFilter filter, Object handback) 55 throws ListenerNotFoundException { 56 ((NotificationEmitter )handler).removeNotificationListener( listener, filter, handback ); 57 } 58 59 public MBeanNotificationInfo [] getNotificationInfo(){ 60 return ((NotificationEmitter )handler).getNotificationInfo(); 61 } 62 } | Popular Tags |