Provides an implementation of {@link javax.management.NotificationEmitter NotificationEmitter}interface. This can be used as the super class of an MBean that sends notifications.
By default, the notification dispatch model is synchronous. That is, when a thread calls sendNotification, the NotificationListener.handleNotification
method of each listener is called within that thread. You can override this default by overriding handleNotification
in a subclass, or by passing an Executor to the constructor.
If the method call of a filter or listener throws an {@link Exception}, then that exception does not prevent other listeners from being invoked. However, if the method call of a filter or of {@code Executor.execute} or of{@code handleNotification} (when no {@code Excecutor} is specified) throws an{@link Error}, then that {@code Error} is propagated to the caller of{@link #sendNotification sendNotification}.
Remote listeners added using the JMX Remote API (see JMXConnector) are not usually called synchronously. That is, when sendNotification returns, it is not guaranteed that any remote listeners have yet received the notification.
@since 1.5