Class Management

java.lang.Object
com.codename1.backend.Management
All Implemented Interfaces:
HttpServer.Handler

public final class Management extends Object implements HttpServer.Handler

The server's management endpoints: health for the load balancer, metrics for a scraper, and the jobs and managed beans for an operator.

  GET  /manage/health          public; 503 while draining
  GET  /manage/metrics         every metric, as JSON
  GET  /manage/prometheus      every metric, in the Prometheus text format
  GET  /manage/jobs            the scheduled jobs and their last runs
  GET  /manage/managed         the managed beans, with their attributes' values
  POST /manage/managed/{bean}/{operation}   calls an operation; body: arguments

Off by default outside a development profile; cn1.management.enabled turns it on or off explicitly, and cn1.management.path moves it. Everything but health needs Authorization: Bearer . Without a token, a development profile serves the read-only views to anyone who can reach the port -- a laptop -- and no profile serves an operation, since an operation changes the running server.