@FunctionalInterfaceSE public interface NotificationPublisher
MBeanServer
SE に送信する方法を意識せずに公開できるようにするシンプルなインターフェース。 管理対象リソースは、NotificationPublisherAware
インターフェースを実装することで NotificationPublisher
にアクセスできます。特定の管理対象リソースインスタンスが MBeanServer
SE に登録された後、そのリソースが NotificationPublisherAware
インターフェースを実装している場合、Spring は NotificationPublisher
インスタンスをインスタンスに挿入します。
各管理対象リソースインスタンスには、NotificationPublisher
実装の個別のインスタンスがあります。このインスタンスは、特定の管理対象リソースに登録されているすべての NotificationListeners
SE を追跡します。
既存のユーザー定義 MBean は、通知の公開に標準の JMX API を使用する必要があります。このインターフェースは、Spring で作成された MBean での使用のみを目的としています。
NotificationPublisherAware
, MBeanExporter
修飾子と型 | メソッドと説明 |
---|---|
void | sendNotification(NotificationSE notification) 指定された Notification SE をすべての登録済み NotificationListeners SE に送信します。 |
void sendNotification(NotificationSE notification) throws UnableToSendNotificationException
Notification
SE をすべての登録済み NotificationListeners
SE に送信します。管理対象リソースは、登録された NotificationListeners
SE のリストを管理する責任はありません。これは自動的に実行されます。notification
- 送信する JMX 通知 UnableToSendNotificationException
- 送信に失敗した場合