Package org.springframework.xd.dirt.analytics

Examples of org.springframework.xd.dirt.analytics.NoSuchMetricException


  @ResponseBody
  @RequestMapping(value = "/{name}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
  public FieldValueCounterResource display(@PathVariable("name") String name) {
    FieldValueCounter c = repository.findOne(name);
    if (c == null) {
      throw new NoSuchMetricException(name, "There is no field-value-counter named '%s'");
    }
    return fvcResourceAssembler.toResource(c);
  }
View Full Code Here


   */
  @RequestMapping(value = "/{name}", method = RequestMethod.DELETE)
  @ResponseStatus(HttpStatus.OK)
  protected void delete(@PathVariable("name") String name) {
    if (!repository.exists(name)) {
      throw new NoSuchMetricException(name, "Can't delete metric '%s' because it does not exist");
    }
    repository.delete(name);
  }
View Full Code Here

  @ResponseBody
  @RequestMapping(value = "/{name}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
  public RichGaugeResource display(@PathVariable("name") String name) {
    RichGauge g = repository.findOne(name);
    if (g == null) {
      throw new NoSuchMetricException(name, "There is no rich gauge named '%s'");
    }
    return gaugeResourceAssembler.toResource(g);
  }
View Full Code Here

  @ResponseBody
  @RequestMapping(value = "/{name}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
  public CounterResource display(@PathVariable("name") String name) {
    Counter c = repository.findOne(name);
    if (c == null) {
      throw new NoSuchMetricException(name, "There is no counter named '%s'");
    }
    return counterResourceAssembler.toResource(c);
  }
View Full Code Here

  @ResponseBody
  @RequestMapping(value = "/{name}", method = RequestMethod.GET)
  public GaugeResource display(@PathVariable("name") String name) {
    Gauge g = repository.findOne(name);
    if (g == null) {
      throw new NoSuchMetricException(name, "There is no gauge named '%s'");
    }
    return gaugeResourceAssembler.toResource(g);
  }
View Full Code Here

TOP

Related Classes of org.springframework.xd.dirt.analytics.NoSuchMetricException

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.