Class InfoManager

java.lang.Object
org.apache.juneau.microservice.management.InfoManager

public class InfoManager extends Object
Shared worker for the /info management endpoint: renders the running application's ManifestFile main attributes (build/version/git metadata) as a map.

Both the mixin and resource flavors delegate here, so the two forms cannot drift — the same shared-worker pattern the health and metrics surfaces use.

The manifest is resolved from the host bean store. A standalone microservice registers its ManifestFile bean during Microservice.init(), so the Main-* attributes (and any build-side stamped Build-*/Git-* fields) are reachable here. When no manifest bean is present the endpoint degrades cleanly to an empty map rather than failing.

See Also:
Since:
10.0.0
  • Constructor Details

  • Method Details

    • resolveManifest

      Resolves the application's ManifestFile from the host context's bean store.
      Parameters:
      context - The REST context whose bean store is searched. May be null.
      Returns:
      The manifest, or null if none is registered (or the context is null).
    • getInfo

      public JsonMap getInfo(ManifestFile manifest)
      Renders the manifest's main attributes (build/version/git metadata) as a sorted map.
      Parameters:
      manifest - The resolved manifest, or null (in which case an empty map is returned).
      Returns:
      A sorted map of manifest attribute → value (empty when manifest is null); never null.