Class InfoManager
java.lang.Object
org.apache.juneau.microservice.management.InfoManager
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetInfo(ManifestFile manifest) Renders the manifest's main attributes (build/version/git metadata) as a sorted map.resolveManifest(RestContext context) Resolves the application'sManifestFilefrom the host context's bean store.
-
Constructor Details
-
InfoManager
public InfoManager()
-
-
Method Details
-
resolveManifest
Resolves the application'sManifestFilefrom the host context's bean store.- Parameters:
context- The REST context whose bean store is searched. May benull .- Returns:
- The manifest, or
null if none is registered (or the context isnull ).
-
getInfo
Renders the manifest's main attributes (build/version/git metadata) as a sorted map.- Parameters:
manifest- The resolved manifest, ornull (in which case an empty map is returned).- Returns:
- A sorted map of manifest attribute → value (empty when
manifestisnull ); nevernull .
-