1 8 9 package mx4j.tools.remote.local; 10 11 import java.io.IOException ; 12 import javax.management.InstanceNotFoundException ; 13 import javax.management.ListenerNotFoundException ; 14 import javax.management.NotificationFilter ; 15 import javax.management.NotificationListener ; 16 import javax.management.ObjectName ; 17 import javax.security.auth.Subject ; 18 19 import mx4j.tools.remote.JMXConnectionHandler; 20 21 24 class LocalConnectionHandler extends JMXConnectionHandler implements LocalConnection 25 { 26 LocalConnectionHandler(String connectionId, LocalConnectionManager manager, LocalConnection target) 27 { 28 super(target, manager, connectionId); 29 } 30 31 public void addNotificationListener(ObjectName observed, NotificationListener listener, NotificationFilter filter, Object handback, Subject delegate) throws InstanceNotFoundException , IOException 32 { 33 if (isClosed()) throw new IOException ("Connection has been closed"); 34 ((LocalConnection)getConnection()).addNotificationListener(observed, listener, filter, handback, delegate); 35 } 36 37 public void removeNotificationListener(ObjectName observed, NotificationListener listener, Subject delegate) throws InstanceNotFoundException , ListenerNotFoundException , IOException 38 { 39 if (isClosed()) throw new IOException ("Connection has been closed"); 40 ((LocalConnection)getConnection()).removeNotificationListener(observed, listener, delegate); 41 } 42 43 public void removeNotificationListener(ObjectName observed, NotificationListener listener, NotificationFilter filter, Object handback, Subject delegate) throws InstanceNotFoundException , ListenerNotFoundException , IOException 44 { 45 if (isClosed()) throw new IOException ("Connection has been closed"); 46 ((LocalConnection)getConnection()).removeNotificationListener(observed, listener, filter, handback, delegate); 47 } 48 } 49 | Popular Tags |