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()Retrieve all instance events as a JSON array.reactor.core.publisher.Flux<org.springframework.http.codec.ServerSentEvent<InstanceEvent>>Stream all instance events as Server-Sent Events (SSE).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) Stream events for a specific instance as Server-Sent Events (SSE).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()Retrieve all instance events as a JSON array. Returns all events for all registered instances. Useful for reconstructing application state or initializing the UI.- Returns:
- flux of
InstanceEventobjects
-
eventStream
@GetMapping(path="/instances/events", produces="text/event-stream") public reactor.core.publisher.Flux<org.springframework.http.codec.ServerSentEvent<InstanceEvent>> eventStream()Stream all instance events as Server-Sent Events (SSE). Returns a continuous stream of instance events for real-time monitoring and UI updates.- Returns:
- flux of
ServerSentEventcontainingInstanceEvent
-
instanceStream
@GetMapping(path="/instances/{id}", produces="text/event-stream") public reactor.core.publisher.Flux<org.springframework.http.codec.ServerSentEvent<Instance>> instanceStream(@PathVariable String id) Stream events for a specific instance as Server-Sent Events (SSE). Streams events for the instance identified by its ID. Each event is delivered as an SSE message.- Parameters:
id- the instance ID- Returns:
- flux of
ServerSentEventcontainingInstance
-