Class InstancesController
java.lang.Object
de.codecentric.boot.admin.server.web.InstancesController
REST controller for controlling registration of managed instances.
-
Constructor Summary
ConstructorsConstructorDescriptionInstancesController(InstanceRegistry registry, InstanceEventStore eventStore) -
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Flux<InstanceEvent>events()reactor.core.publisher.Flux<org.springframework.http.codec.ServerSentEvent<InstanceEvent>>reactor.core.publisher.Mono<org.springframework.http.ResponseEntity<Instance>>Get a single instance.reactor.core.publisher.Flux<Instance>List all registered instances with namereactor.core.publisher.Flux<Instance>List all registered instances with namereactor.core.publisher.Flux<org.springframework.http.codec.ServerSentEvent<Instance>>instanceStream(String id) reactor.core.publisher.Mono<org.springframework.http.ResponseEntity<Map<String,InstanceId>>> register(Registration registration, org.springframework.web.util.UriComponentsBuilder builder) Register an instance.reactor.core.publisher.Mono<org.springframework.http.ResponseEntity<Void>>unregister(String id) Unregister an instance
-
Constructor Details
-
InstancesController
-
-
Method Details
-
register
@PostMapping(path="/instances", consumes="application/json") public reactor.core.publisher.Mono<org.springframework.http.ResponseEntity<Map<String,InstanceId>>> register(@RequestBody Registration registration, org.springframework.web.util.UriComponentsBuilder builder) Register an instance.- Parameters:
registration- registration infobuilder- the UriComponentsBuilder- Returns:
- the registered instance id;
-
instances
@GetMapping(path="/instances", produces="application/json", params="name") public reactor.core.publisher.Flux<Instance> instances(@RequestParam("name") String name) List all registered instances with name- Parameters:
name- the name to search for- Returns:
- application list
-
instances
@GetMapping(path="/instances", produces="application/json") public reactor.core.publisher.Flux<Instance> instances()List all registered instances with name- Returns:
- application list
-
instance
@GetMapping(path="/instances/{id}", produces="application/json") public reactor.core.publisher.Mono<org.springframework.http.ResponseEntity<Instance>> instance(@PathVariable String id) Get a single instance.- Parameters:
id- the application identifier.- Returns:
- the registered application.
-
unregister
@DeleteMapping(path="/instances/{id}") public reactor.core.publisher.Mono<org.springframework.http.ResponseEntity<Void>> unregister(@PathVariable String id) Unregister an instance- Parameters:
id- the instance id.- Returns:
- response indicating the success
-
events
@GetMapping(path="/instances/events", produces="application/json") public reactor.core.publisher.Flux<InstanceEvent> events() -
eventStream
@GetMapping(path="/instances/events", produces="text/event-stream") public reactor.core.publisher.Flux<org.springframework.http.codec.ServerSentEvent<InstanceEvent>> eventStream() -
instanceStream
-