ModelMBeanInfoSupport.java 文件源码

java
阅读 26 收藏 0 点赞 0 评论 0

项目:OpenJSharp 作者:
public ModelMBeanNotificationInfo getNotification(String inName)
throws MBeanException, RuntimeOperationsException {
    ModelMBeanNotificationInfo retInfo = null;
    if (MODELMBEAN_LOGGER.isLoggable(Level.FINER)) {
        MODELMBEAN_LOGGER.logp(Level.FINER,
                ModelMBeanInfoSupport.class.getName(),
                "getNotification(String)", "Entry");
    }
    if (inName == null) {
        throw new RuntimeOperationsException(
                new IllegalArgumentException("Notification name is null"),
                "Exception occurred trying to get the " +
                "ModelMBeanNotificationInfo of the MBean");
    }
    MBeanNotificationInfo[] notifList = modelMBeanNotifications; //this.getNotifications();
    int numNotifs = 0;
    if (notifList != null) numNotifs = notifList.length;

    for (int i=0; (i < numNotifs) && (retInfo == null); i++) {
        if (inName.equals(notifList[i].getName())) {
            retInfo = ((ModelMBeanNotificationInfo) notifList[i].clone());
        }
    }
    if (MODELMBEAN_LOGGER.isLoggable(Level.FINER)) {
        MODELMBEAN_LOGGER.logp(Level.FINER,
                ModelMBeanInfoSupport.class.getName(),
                "getNotification(String)", "Exit");
    }

    return retInfo;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号