Examples of ManagedNotification


Examples of org.springframework.jmx.export.metadata.ManagedNotification

    }
    Annotation[] notifications = notificationsAnn.value();
    ManagedNotification[] result = new ManagedNotification[notifications.length];
    for (int i = 0; i < notifications.length; i++) {
      Annotation notification = notifications[i];
      ManagedNotification managedNotification = new ManagedNotification();
      AnnotationBeanUtils.copyPropertiesToBean(notification, managedNotification);
      result[i] = managedNotification;
    }
    return result;
  }
View Full Code Here

Examples of org.springframework.jmx.export.metadata.ManagedNotification

        this.attributeSource.getManagedNotifications(getClassToExpose(managedBean));
    ModelMBeanNotificationInfo[] notificationInfos =
        new ModelMBeanNotificationInfo[notificationAttributes.length];

    for (int i = 0; i < notificationAttributes.length; i++) {
      ManagedNotification attribute = notificationAttributes[i];
      notificationInfos[i] = JmxMetadataUtils.convertToModelMBeanNotificationInfo(attribute);
    }

    return notificationInfos;
  }
View Full Code Here

Examples of org.springframework.jmx.export.metadata.ManagedNotification

    Annotation[] notifications = notificationsAnn.value();
    ManagedNotification[] result = new ManagedNotification[notifications.length];
    for (int i = 0; i < notifications.length; i++) {
      Annotation notification = notifications[i];

      ManagedNotification managedNotification = new ManagedNotification();
      AnnotationBeanUtils.copyPropertiesToBean(notification, managedNotification);
      result[i] = managedNotification;
    }
    return result;
  }
View Full Code Here

Examples of org.springframework.jmx.export.metadata.ManagedNotification

        this.attributeSource.getManagedNotifications(getClassToExpose(managedBean));
    ModelMBeanNotificationInfo[] notificationInfos =
        new ModelMBeanNotificationInfo[notificationAttributes.length];

    for (int i = 0; i < notificationAttributes.length; i++) {
      ManagedNotification attribute = notificationAttributes[i];
      notificationInfos[i] = JmxMetadataUtils.convertToModelMBeanNotificationInfo(attribute);
    }

    return notificationInfos;
  }
View Full Code Here

Examples of org.springframework.jmx.export.metadata.ManagedNotification


  public void setNotificationInfos(ManagedNotification[] notificationInfos) {
    ModelMBeanNotificationInfo[] infos = new ModelMBeanNotificationInfo[notificationInfos.length];
    for (int i = 0; i < notificationInfos.length; i++) {
      ManagedNotification notificationInfo = notificationInfos[i];
      infos[i] = JmxMetadataUtils.convertToModelMBeanNotificationInfo(notificationInfo);
    }
    this.notificationInfos = infos;
  }
View Full Code Here

Examples of org.springframework.jmx.export.metadata.ManagedNotification

    return (result == null) ? new ModelMBeanNotificationInfo[0] : result;
  }

  private ModelMBeanNotificationInfo[] extractNotificationMetadata(Object mapValue) {
    if (mapValue instanceof ManagedNotification) {
      ManagedNotification mn = (ManagedNotification) mapValue;
      return new ModelMBeanNotificationInfo[] {JmxMetadataUtils.convertToModelMBeanNotificationInfo(mn)};
    }
    else if (mapValue instanceof Collection) {
      Collection col = (Collection) mapValue;
      List result = new ArrayList();
      for (Iterator iterator = col.iterator(); iterator.hasNext();) {
        Object colValue = iterator.next();
        if (!(colValue instanceof ManagedNotification)) {
          throw new IllegalArgumentException(
              "Property 'notificationInfoMappings' only accepts ManagedNotifications for Map values");
        }
        ManagedNotification mn = (ManagedNotification) colValue;
        result.add(JmxMetadataUtils.convertToModelMBeanNotificationInfo(mn));
      }
      return (ModelMBeanNotificationInfo[]) result.toArray(new ModelMBeanNotificationInfo[result.size()]);
    }
    else {
View Full Code Here

Examples of org.springframework.jmx.export.metadata.ManagedNotification

        this.attributeSource.getManagedNotifications(getClassToExpose(managedBean));
    ModelMBeanNotificationInfo[] notificationInfos =
        new ModelMBeanNotificationInfo[notificationAttributes.length];

    for (int i = 0; i < notificationAttributes.length; i++) {
      ManagedNotification attribute = notificationAttributes[i];
      notificationInfos[i] = JmxMetadataUtils.convertToModelMBeanNotificationInfo(attribute);
    }

    return notificationInfos;
  }
View Full Code Here

Examples of org.springframework.jmx.export.metadata.ManagedNotification

    Annotation[] notifications = notificationsAnn.value();
    ManagedNotification[] result = new ManagedNotification[notifications.length];
    for (int i = 0; i < notifications.length; i++) {
      Annotation notification = notifications[i];

      ManagedNotification managedNotification = new ManagedNotification();
      AnnotationBeanUtils.copyPropertiesToBean(notification, managedNotification);
      result[i] = managedNotification;
    }
    return result;
  }
View Full Code Here

Examples of org.springframework.jmx.export.metadata.ManagedNotification


  public void setNotificationInfos(ManagedNotification[] notificationInfos) {
    ModelMBeanNotificationInfo[] infos = new ModelMBeanNotificationInfo[notificationInfos.length];
    for (int i = 0; i < notificationInfos.length; i++) {
      ManagedNotification notificationInfo = notificationInfos[i];
      infos[i] = JmxMetadataUtils.convertToModelMBeanNotificationInfo(notificationInfo);
    }
    this.notificationInfos = infos;
  }
View Full Code Here

Examples of org.springframework.jmx.export.metadata.ManagedNotification

    return (result != null ? result : new ModelMBeanNotificationInfo[0]);
  }

  private ModelMBeanNotificationInfo[] extractNotificationMetadata(Object mapValue) {
    if (mapValue instanceof ManagedNotification) {
      ManagedNotification mn = (ManagedNotification) mapValue;
      return new ModelMBeanNotificationInfo[] {JmxMetadataUtils.convertToModelMBeanNotificationInfo(mn)};
    }
    else if (mapValue instanceof Collection) {
      Collection<?> col = (Collection<?>) mapValue;
      List<ModelMBeanNotificationInfo> result = new ArrayList<ModelMBeanNotificationInfo>();
      for (Object colValue : col) {
        if (!(colValue instanceof ManagedNotification)) {
          throw new IllegalArgumentException(
              "Property 'notificationInfoMappings' only accepts ManagedNotifications for Map values");
        }
        ManagedNotification mn = (ManagedNotification) colValue;
        result.add(JmxMetadataUtils.convertToModelMBeanNotificationInfo(mn));
      }
      return result.toArray(new ModelMBeanNotificationInfo[result.size()]);
    }
    else {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.