|
Oracle® Fusion Middleware Java API Reference for Oracle Coherence 12c (12.1.3.0.0) E47890-01 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface NotificationManager
A NotificationManager is responsible for JMX notification delivery from a managed node to a set of subscribing managing nodes.
For Standard MBeans that implement the NotificationEmitter
interface and Platform MBeans registered with the Coherence Registry
, notifications will be automatically sent to the corresponding MBean within the Coherence domain (e.g. "Coherence:type=Platform,Domain=java.lang,subType=Memory,nodeId=1"). Additionally, application logic can send notifications using the NotificationManager as follows:
Cluster cluster = CacheFactory.ensureCluster(); Registry registry = cluster.getManagement(); NotificationManager manager = registry.getNotificationManger(); String sName = registry.ensureGlobalName("type=CustomMBean"); if (manager.isSubscribedTo(sName)) { manager.trigger(sName, "custom.notification.type", "Custom notification message"); }
Method Summary | |
---|---|
boolean |
isSubscribedTo(java.lang.String sName) Determine if any subscriptions exist for the specified MBean. |
void |
trigger(java.lang.String sName, javax.management.Notification notification) Trigger the notification on subscribers for a given MBean. |
void |
trigger(java.lang.String sName, java.lang.String sType, java.lang.String sMessage) Trigger the notification on subscribers for a given MBean. |
Method Detail |
---|
boolean isSubscribedTo(java.lang.String sName)
sName
- the MBean name to check for subscriptionsvoid trigger(java.lang.String sName, java.lang.String sType, java.lang.String sMessage) throws java.lang.IllegalArgumentException
sName
- the MBean namesType
- the notification typesMessage
- the notification messagejava.lang.IllegalArgumentException
- if an MBean with the specified name does not existsvoid trigger(java.lang.String sName, javax.management.Notification notification) throws java.lang.IllegalArgumentException
Note: if the specified Notification object has a negative SequenceNumber
, it will be automatically assigned.
sName
- the MBean namenotification
- the notification objectjava.lang.IllegalArgumentException
- if an MBean with the specified name does not exists
|
Oracle® Fusion Middleware Java API Reference for Oracle Coherence 12c (12.1.3.0.0) E47890-01 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |