Interface AgentLauncher
- All Superinterfaces:
org.springframework.boot.actuate.health.HealthContributor
,org.springframework.boot.actuate.health.HealthIndicator
- All Known Implementing Classes:
LocalAgentLauncherImpl
,TitusAgentLauncherImpl
public interface AgentLauncher
extends org.springframework.boot.actuate.health.HealthIndicator
A interface which implementations will launch instances of an agent in some manner in order to run a job.
- Since:
- 4.0.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Shared name of a timer that can be used by launchers to record how long it took them to perform their respective launch.static final String
Shared key representing the class that key for the Launcher Ext context the API can return.static final String
Shared key for a tag that can be added to the timer metric to add the implementation class in order to aid in adding a convenient dimension.static final String
Shared key representing the hostname of the Genie server the Agent Launcher was executed on. -
Method Summary
Modifier and TypeMethodDescriptionOptional<com.fasterxml.jackson.databind.JsonNode>
launchAgent
(ResolvedJob resolvedJob, com.fasterxml.jackson.databind.JsonNode requestedLauncherExt) Launch an agent to execute the givenResolvedJob
information.Methods inherited from interface org.springframework.boot.actuate.health.HealthIndicator
getHealth, health
-
Field Details
-
LAUNCH_TIMER
Shared name of a timer that can be used by launchers to record how long it took them to perform their respective launch.- See Also:
-
LAUNCHER_CLASS_KEY
Shared key for a tag that can be added to the timer metric to add the implementation class in order to aid in adding a convenient dimension.- See Also:
-
LAUNCHER_CLASS_EXT_FIELD
Shared key representing the class that key for the Launcher Ext context the API can return.- See Also:
-
SOURCE_HOST_EXT_FIELD
Shared key representing the hostname of the Genie server the Agent Launcher was executed on.- See Also:
-
-
Method Details
-
launchAgent
Optional<com.fasterxml.jackson.databind.JsonNode> launchAgent(ResolvedJob resolvedJob, @Nullable com.fasterxml.jackson.databind.JsonNode requestedLauncherExt) throws AgentLaunchException Launch an agent to execute the givenResolvedJob
information.- Parameters:
resolvedJob
- TheResolvedJob
information for the agent to act onrequestedLauncherExt
- The launcher requested extension, or null- Returns:
- an optional
JsonNode
with the launcher context about the launched job - Throws:
AgentLaunchException
- For any error launching an Agent instance to run the job
-