@Controller @RequestMapping(value="/metrics/gauges") @ExposesResourceFor(value=GaugeResource.class) public class GaugesController extends java.lang.Object
Gauge
s.Modifier and Type | Field and Description |
---|---|
protected R |
repository |
protected org.springframework.hateoas.ResourceAssembler<M,MetricResource> |
shallowResourceAssembler |
Constructor and Description |
---|
GaugesController(GaugeRepository repository) |
Modifier and Type | Method and Description |
---|---|
protected void |
delete(java.lang.String name)
Deletes the metric from the repository
|
GaugeResource |
display(java.lang.String name) |
org.springframework.hateoas.PagedResources<? extends MetricResource> |
list(org.springframework.data.domain.Pageable pageable,
org.springframework.data.web.PagedResourcesAssembler<Gauge> pagedAssembler,
boolean detailed) |
protected org.springframework.hateoas.PagedResources<? extends MetricResource> |
list(org.springframework.data.domain.Pageable pageable,
org.springframework.data.web.PagedResourcesAssembler<M> pagedAssembler,
org.springframework.hateoas.ResourceAssembler<M,? extends MetricResource> resourceAssembler)
Lists metric resources.
|
protected final R extends MetricRepository<M> repository
protected final org.springframework.hateoas.ResourceAssembler<M extends Metric,MetricResource> shallowResourceAssembler
@Autowired public GaugesController(GaugeRepository repository)
@ResponseBody @RequestMapping(value="", method=GET) public org.springframework.hateoas.PagedResources<? extends MetricResource> list(org.springframework.data.domain.Pageable pageable, org.springframework.data.web.PagedResourcesAssembler<Gauge> pagedAssembler, @RequestParam(value="detailed",defaultValue="false") boolean detailed)
@ResponseBody @RequestMapping(value="/{name}", method=GET) public GaugeResource display(@PathVariable(value="name") java.lang.String name)
protected org.springframework.hateoas.PagedResources<? extends MetricResource> list(org.springframework.data.domain.Pageable pageable, org.springframework.data.web.PagedResourcesAssembler<M> pagedAssembler, org.springframework.hateoas.ResourceAssembler<M,? extends MetricResource> resourceAssembler)
pageable
- the PageablepagedAssembler
- the PagedResourcesAssemblerresourceAssembler
- the ResourceAssembler@RequestMapping(value="/{name}", method=DELETE) @ResponseStatus(value=OK) protected void delete(@PathVariable(value="name") java.lang.String name)
name
- the name of the metric to delete