Skip navigation links

Overview | Package | Class | Tree | Index | Help
| Oracle® Coherence Java API Reference Release 3.6.1.0 E18814-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.tangosol.net.management
Interface NotificationManager

      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");
          }

Since:
  Coherence 3.6
Author:
  ew 2010.02.05

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

### isSubscribedTo

    boolean isSubscribedTo(java.lang.String sName)

  Determine if any subscriptions exist for the specified MBean.
  Parameters:
    `sName` - the MBean name to check for subscriptions
  Returns:
    true iff the specified name identifies the MBean that was registered by the caller's node and subscriptions exist for that MBean

### trigger

    void trigger(java.lang.String sName,
                 java.lang.String sType,
                 java.lang.String sMessage)
                 throws java.lang.IllegalArgumentException

  Trigger the notification on subscribers for a given MBean.
  Parameters:
    `sName` - the MBean name
    `sType` - the notification type
    `sMessage` - the notification message
  Throws:
    `java.lang.IllegalArgumentException` - if an MBean with the specified name does not exists

### trigger

    void trigger(java.lang.String sName,
                 javax.management.Notification notification)
                 throws java.lang.IllegalArgumentException

  Trigger the notification on subscribers for a given MBean. Note: if the specified Notification object has a negative `SequenceNumber`, it will be automatically assigned.
  Parameters:
    `sName` - the MBean name
    `notification` - the notification object
  Throws:
    `java.lang.IllegalArgumentException` - if an MBean with the specified name does not exists

Skip navigation links

Overview | Package | Class | Tree | Index | Help
| Oracle® Coherence Java API Reference Release 3.6.1.0 E18814-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000, 2010, Oracle and/or its affiliates. All rights reserved.