com.sun.jdmk
Interface NotificationRegistration

All Known Subinterfaces:
ClientNotificationHandler, MBeanInterceptor, MBeanServerInt, MBeanServerInterceptor, ProxyHandler, RemoteMBeanServer
All Known Implementing Classes:
CompatibleMBeanInterceptor, DefaultMBeanInterceptor, DefaultMBeanServerInterceptor, ForwardingMBeanServerInterceptor, GenericHttpConnectorClient, HttpConnectorClient, HttpsConnectorClient, MBeanInterceptorWrapper, MBeanServerImpl, MBeanServerInterceptorWrapper, RmiConnectorClient

public interface NotificationRegistration

This interface specifies the methods to add or to remove a notification listener to an MBean via a MBean server (remote or local).


Method Summary
 void addNotificationListener(ObjectName name, NotificationListener listener, NotificationFilter filter, Object handback)
          Adds a listener to a registered MBean.
 void removeNotificationListener(ObjectName name, NotificationListener listener)
          Removes a listener from a registered MBean.
 

Method Detail

addNotificationListener

void addNotificationListener(ObjectName name,
                             NotificationListener listener,
                             NotificationFilter filter,
                             Object handback)
                             throws InstanceNotFoundException
Adds a listener to a registered MBean.

Parameters:
name - The objectname of the MBean on which the listener should be added.
listener - The listener which will handle the notifications emitted by the registered MBean.
filter - The filter used to do filtering. If filter is null, no filtering will be performed before handling notifications.
handback - The context to be sent to the listener when a notification is emitted.
Throws:
InstanceNotFoundException - The MBean name provided does not match any of the registered MBeans.

removeNotificationListener

void removeNotificationListener(ObjectName name,
                                NotificationListener listener)
                                throws InstanceNotFoundException,
                                       ListenerNotFoundException
Removes a listener from a registered MBean. It will remove all the information related to this listener.

Parameters:
name - The objectname of the MBean on which the listener should be removed.
listener - The listener which will handle the notifications emitted by the registered MBean.
Throws:
InstanceNotFoundException - The MBean name provided does not match any of the registered MBeans.
ListenerNotFoundException - The listener is not registered in the MBean.

Open Source build 02
opendmk-1.0-b02 2007.10.01_19:17:46_MEST

Copyright 1998-2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.