Constructs a NotificationBroadcasterSupport with information about the notifications that may be sent,
and where each listener is invoked using the given Executor
.
When sendNotification
is called, a
listener is selected if it was added with a null NotificationFilter
, or if isNotificationEnabled
returns true for the notification being sent. The call to
NotificationFilter.isNotificationEnabled
takes
place in the thread that called
sendNotification
. Then, for each selected
listener, executor.execute
is called
with a command that calls the handleNotification
method.
If the info
array is not empty, then it is
cloned by the constructor as if by info.clone()
, and
each call to NotificationBroadcasterSupport.getNotificationInfo()
returns a new
clone.
Parameters:
-
executor - an executor used by the method
sendNotification
to send each notification. If it
is null, the thread calling
sendNotification
will
invoke the
handleNotification
method itself.
-
info - an array indicating, for each notification this
MBean may send, the name of the Java class of the notification
and the notification type. Can be null, which is equivalent to
an empty array.
Since:
1.6