1 22 package org.jboss.management.mejb; 23 24 import org.jboss.logging.Logger; 25 26 import javax.management.Notification ; 27 import java.rmi.RemoteException ; 28 29 40 public class RMINotificationListener 41 implements RMINotificationListenerMBean 42 { 43 private static final Logger log = Logger.getLogger(RMINotificationListener.class); 44 45 49 private RMIClientNotificationListenerInterface mClientListener; 50 51 55 64 public RMINotificationListener(RMIClientNotificationListenerInterface pClientListener) 65 { 66 log.debug("RMINotificationListener(), client listener: " + pClientListener); 67 mClientListener = pClientListener; 68 } 69 70 74 81 public void handleNotification(Notification pNotification, 82 Object pHandback) 83 { 84 try 85 { 86 log.debug("RMINotificationListener.handleNotification() " + 87 ", notification: " + pNotification + 88 ", handback: " + pHandback + 89 ", client listener: " + mClientListener); 90 mClientListener.handleNotification(pNotification, pHandback); 91 } 92 catch (RemoteException e) 93 { 94 throw new org.jboss.util.NestedRuntimeException(e); 95 } 96 } 97 98 106 public boolean equals(Object pTest) 107 { 108 if (pTest instanceof RMINotificationListener) 109 { 110 return mClientListener.equals(((RMINotificationListener) pTest).mClientListener); 111 } 112 return false; 113 } 114 115 118 public int hashCode() 119 { 120 return mClientListener.hashCode(); 121 } 122 } 123 | Popular Tags |