1 25 package org.objectweb.jonas.mejb; 26 27 import javax.rmi.PortableRemoteObject ; 28 import java.rmi.RemoteException ; 29 30 import javax.management.Notification ; 32 import javax.management.NotificationListener ; 33 import javax.management.NotificationFilter ; 34 35 41 public class ListenerProxyImpl extends PortableRemoteObject implements ListenerProxy { 42 43 NotificationListener listener = null; 44 NotificationFilter filter = null; 45 46 public ListenerProxyImpl() throws RemoteException { 47 super(); 48 } 49 50 public void addNotificationListener(NotificationListener listener, NotificationFilter filter) 51 throws RemoteException 52 { 53 this.listener = listener; 55 this.filter = filter; 56 } 57 public void removeNotificationListener(NotificationListener listener) 58 throws RemoteException 59 { 60 if (listener.equals(this.listener)) { 61 this.listener = null; 63 this.filter = null; 64 } 65 } 66 public void handleNotification(Notification notification, Object handback) 67 throws RemoteException { 68 listener.handleNotification(notification, handback); 70 } 71 } 72 | Popular Tags |