javax.management

Class NotificationBroadcasterSupport

  • All Implemented Interfaces:
    NotificationBroadcaster, NotificationEmitter
    Direct Known Subclasses:
    JMXConnectorServer, Monitor, RelationService, Timer

    public class NotificationBroadcasterSupport
    extends Object
    implements NotificationEmitter

    Provides an implementation of 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 Exception, then that exception does not prevent other listeners from being invoked. However, if the method call of a filter or of Executor.execute or of handleNotification (when no Excecutor is specified) throws an Error, then that Error is propagated to the caller of 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
    • Constructor Detail

      • NotificationBroadcasterSupport

        public NotificationBroadcasterSupport()
        Constructs a NotificationBroadcasterSupport where each listener is invoked by the thread sending the notification. This constructor is equivalent to NotificationBroadcasterSupport(null, null).
      • NotificationBroadcasterSupport

        public NotificationBroadcasterSupport(Executor executor)
        Constructs a NotificationBroadcasterSupport 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. This constructor is equivalent to NotificationBroadcasterSupport(executor, null).
        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.
        Since:
        1.6
      • NotificationBroadcasterSupport

        public NotificationBroadcasterSupport(MBeanNotificationInfo... info)

        Constructs a NotificationBroadcasterSupport with information about the notifications that may be sent. Each listener is invoked by the thread sending the notification. This constructor is equivalent to NotificationBroadcasterSupport(null, info).

        If the info array is not empty, then it is cloned by the constructor as if by info.clone(), and each call to getNotificationInfo() returns a new clone.

        Parameters:
        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
      • NotificationBroadcasterSupport

        public NotificationBroadcasterSupport(Executor executor,
                                      MBeanNotificationInfo... info)

        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 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

Nederlandse vertaling

U hebt gevraagd om deze site in het Nederlands te bezoeken. Voor nu wordt alleen de interface vertaald, maar nog niet alle inhoud.

Als je me wilt helpen met vertalingen, is je bijdrage welkom. Het enige dat u hoeft te doen, is u op de site registreren en mij een bericht sturen waarin u wordt gevraagd om u toe te voegen aan de groep vertalers, zodat u de gewenste pagina's kunt vertalen. Een link onderaan elke vertaalde pagina geeft aan dat u de vertaler bent en heeft een link naar uw profiel.

Bij voorbaat dank.

Document heeft de 11/06/2005 gemaakt, de laatste keer de 04/03/2020 gewijzigd
Bron van het afgedrukte document:https://www.gaudry.be/nl/java-api-rf-javax/management/NotificationBroadcasterSupport.html

De infobrol is een persoonlijke site waarvan de inhoud uitsluitend mijn verantwoordelijkheid is. De tekst is beschikbaar onder CreativeCommons-licentie (BY-NC-SA). Meer info op de gebruiksvoorwaarden en de auteur.

Referenties

  1. Bekijk - html-document Taal van het document:fr Manuel PHP : https://docs.oracle.com

Deze verwijzingen en links verwijzen naar documenten die geraadpleegd zijn tijdens het schrijven van deze pagina, of die aanvullende informatie kunnen geven, maar de auteurs van deze bronnen kunnen niet verantwoordelijk worden gehouden voor de inhoud van deze pagina.
De auteur Deze site is als enige verantwoordelijk voor de manier waarop de verschillende concepten, en de vrijheden die met de referentiewerken worden genomen, hier worden gepresenteerd. Vergeet niet dat u meerdere broninformatie moet doorgeven om het risico op fouten te verkleinen.

Inhoudsopgave Haut