Top Description Fields Constructors Methods
org.apache.tomcat.util.modeler

public Class BaseNotificationBroadcaster

Additional top-level class in compilation unit: BaseNotificationBroadcasterEntry.

extends Object
implements NotificationBroadcaster
Class Inheritance
All Implemented Interfaces
javax.management.NotificationBroadcaster
Imports
java.util.ArrayList, javax.management.ListenerNotFoundException, .MBeanNotificationInfo, .Notification, .NotificationBroadcaster, .NotificationFilter, .NotificationListener

Implementation of NotificationBroadcaster for attribute change notifications. This class is used by BaseModelMBean to handle notifications of attribute change events to interested listeners.
Authors
Craig R. McClanahan, Costin Manolache

Field Summary

Modifier and TypeField and Description
protected ArrayList<BaseNotificationBroadcasterEntry>
entries

The set of registered BaseNotificationBroadcasterEntry entries.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
addNotificationListener(NotificationListener
Listener that will receive event notifications
listener
,
NotificationFilter
Filter object used to filter event notifications actually delivered, or null for no filtering
filter
,
Object
Handback object to be sent along with event notifications
handback
)

Implements javax.management.NotificationBroadcaster.addNotificationListener.

Add a notification event listener to this MBean.

public MBeanNotificationInfo[]
getNotificationInfo()

Implements javax.management.NotificationBroadcaster.getNotificationInfo.

Return an MBeanNotificationInfo object describing the notifications sent by this MBean.

public void
removeNotificationListener(NotificationListener
The listener to be removed (any and all registrations for this listener will be eliminated)
listener
)

Implements javax.management.NotificationBroadcaster.removeNotificationListener.

Remove a notification event listener from this MBean.

public void
sendNotification(Notification
The notification to be sent
notification
)

Send the specified notification to all interested listeners.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

entriesback to summary
protected ArrayList<BaseNotificationBroadcasterEntry> entries

The set of registered BaseNotificationBroadcasterEntry entries.

Constructor Detail

BaseNotificationBroadcasterback to summary
public BaseNotificationBroadcaster()

Method Detail

addNotificationListenerback to summary
public void addNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) throws IllegalArgumentException

Implements javax.management.NotificationBroadcaster.addNotificationListener.

Add a notification event listener to this MBean.

Parameters
listener:NotificationListener

Listener that will receive event notifications

filter:NotificationFilter

Filter object used to filter event notifications actually delivered, or null for no filtering

handback:Object

Handback object to be sent along with event notifications

Annotations
@Override
Exceptions
IllegalArgumentException:
if the listener parameter is null
getNotificationInfoback to summary
public MBeanNotificationInfo[] getNotificationInfo()

Implements javax.management.NotificationBroadcaster.getNotificationInfo.

Return an MBeanNotificationInfo object describing the notifications sent by this MBean.

Returns:MBeanNotificationInfo[]

Doc from javax.management.NotificationBroadcaster.getNotificationInfo.

the array of possible notifications.

Annotations
@Override
removeNotificationListenerback to summary
public void removeNotificationListener(NotificationListener listener) throws ListenerNotFoundException

Implements javax.management.NotificationBroadcaster.removeNotificationListener.

Remove a notification event listener from this MBean.

Parameters
listener:NotificationListener

The listener to be removed (any and all registrations for this listener will be eliminated)

Annotations
@Override
Exceptions
ListenerNotFoundException:
if this listener is not registered in the MBean
sendNotificationback to summary
public void sendNotification(Notification notification)

Send the specified notification to all interested listeners.

Parameters
notification:Notification

The notification to be sent