1 22 package org.jboss.jmx.adaptor.rmi; 23 24 import javax.management.Notification ; 25 import javax.management.NotificationListener ; 26 import org.jboss.logging.Logger; 27 28 32 public class NotificationListenerDelegate 33 implements NotificationListener 34 { 35 private static Logger log = Logger.getLogger(NotificationListenerDelegate.class); 36 37 private RMINotificationListener client; 38 39 public NotificationListenerDelegate(RMINotificationListener client) 40 { 41 this.client = client; 42 } 43 44 public void handleNotification(Notification notification, 45 Object handback) 46 { 47 try 48 { 49 log.info("Sending notification to client, event:"+notification); 50 client.handleNotification(notification, handback); 51 } 52 catch(Throwable t) 53 { 54 log.warn("Failed to notify client", t); 55 } 56 } 57 } 58 | Popular Tags |