Package org.platformlayer.ops.model.metrics

Examples of org.platformlayer.ops.model.metrics.MetricConfig


  public MetricConfig getMetricsInfo() throws OpsException {
    if (metrics == null) {
      metrics = ResourceUtils.findResource(getClass(), getMetricKey() + ".metrics", MetricConfig.class);
      if (metrics == null) {
        // Empty to stop reload attempts
        metrics = new MetricConfig();
      }
    }
    return metrics;
  }
View Full Code Here


  final List<MetricConfig> metricConfigs = Lists.newArrayList();

  public MetricConfig getMetricInfo(Object target) throws OpsException {
    visit(target);

    MetricConfig metricConfig = new MetricConfig();
    metricConfig.metrics = metricConfigs;
    return metricConfig;
  }
View Full Code Here

  void visitMethods(Object target) throws OpsException {
    for (Method method : target.getClass().getMethods()) {
      Class<?> returnType = method.getReturnType();
      if (returnType.equals(MetricConfig.class)) {
        MetricConfig metricConfig;
        try {
          metricConfig = (MetricConfig) method.invoke(target, (Object[]) null);
        } catch (IllegalArgumentException e) {
          throw new OpsException("Error invoking method: " + method, e);
        } catch (IllegalAccessException e) {
View Full Code Here

      @Override
      public MetricInfoCollection call() throws Exception {
        BindingScope bindingScope = BindingScope.push(managedItem, managedItem);
        try {
          Object controller = serviceProvider.getController(managedItem);
          MetricConfig metricConfig = opsContext.getMetricInfo(controller);

          return MetricCollector.toMetricInfo(metricConfig);
        } finally {
          bindingScope.pop();
        }
View Full Code Here

TOP

Related Classes of org.platformlayer.ops.model.metrics.MetricConfig

Copyright © 2018 www.massapicom. 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.