Example usage for javax.management MBeanNotificationInfo MBeanNotificationInfo

List of usage examples for javax.management MBeanNotificationInfo MBeanNotificationInfo

Introduction

In this page you can find the example usage for javax.management MBeanNotificationInfo MBeanNotificationInfo.

Prototype

public MBeanNotificationInfo(String[] notifTypes, String name, String description) 

Source Link

Document

Constructs an MBeanNotificationInfo object.

Usage

From source file:org.marketcetera.strategy.StrategyModule.java

/**
 * Create a new StrategyModule instance.
 *
 * @param inURN a <code>ModuleURN</code> value containing the instance URN for this strategy
 * @param inName a <code>String</code> value containing the user-specified, human-readable name for this strategy
 * @param inType a <code>Language</code> value containing the language type as which to execute this strategy
 * @param inSource a <code>File</code> value containing the source of the strategy code
 * @param inParameters a <code>Properties</code> value containing parameters to pass to the strategy.  may be null.
 * @param inRouteOrdersToORS a <code>boolean</code> value indicating whether to route orders to the ORS or not
 * @param inOutputInstance a <code>ModuleURN</code> value containing a {@link DataReceiver} to which to pass outputs generated by this strategy.  may be null.
 * @throws ModuleCreationException if the strategy cannot be created
 *///w  ww  .j  a va 2 s .c  o  m
private StrategyModule(ModuleURN inURN, String inName, Language inType, File inSource, Properties inParameters,
        boolean inRouteOrdersToORS, ModuleURN inOutputInstance) throws ModuleCreationException {
    super(inURN, false);
    name = inName;
    type = inType;
    source = inSource;
    parameters = inParameters;
    routeOrdersToORS = inRouteOrdersToORS;
    outputDestination = inOutputInstance;
    MBeanNotificationInfo notifyInfo = new MBeanNotificationInfo(
            new String[] { AttributeChangeNotification.ATTRIBUTE_CHANGE },
            AttributeChangeNotification.class.getName(), BEAN_ATTRIBUTE_CHANGED.getText());
    notificationDelegate = new NotificationBroadcasterSupport(notifyInfo);
}

From source file:org.opencastproject.serviceregistry.impl.jmx.HostsStatistics.java

@Override
public MBeanNotificationInfo[] getNotificationInfo() {
    String[] types = new String[] { JmxUtil.MATTERHORN_UPDATE_NOTIFICATION };

    String name = Notification.class.getName();
    String description = "An update was executed";
    MBeanNotificationInfo info = new MBeanNotificationInfo(types, name, description);
    return new MBeanNotificationInfo[] { info };
}