Package com.google.adk.web.service
Class RunnerService
java.lang.Object
com.google.adk.web.service.RunnerService
Serves the configured apps, and creates and caches a Runner for each.
-
Constructor Summary
ConstructorsConstructorDescriptionRunnerService(AgentLoader agentProvider, BaseArtifactService artifactService, BaseSessionService sessionService, BaseMemoryService memoryService, List<BasePlugin> extraPlugins) Serves the agents ofagentProvider.RunnerService(AppLoader appLoader, BaseArtifactService artifactService, BaseSessionService sessionService, BaseMemoryService memoryService, List<BasePlugin> extraPlugins) Serves the apps ofappLoader. -
Method Summary
Modifier and TypeMethodDescriptionGets the Runner instance for a given application name.com.google.common.collect.ImmutableList<String>listApps()Returns the names of the apps this server serves.Returns the root that the appappNameruns: the workflow node it runs, or else its root agent.voidonAgentUpdated(String agentName) Called by hot loader when agents are updated
-
Constructor Details
-
RunnerService
public RunnerService(AppLoader appLoader, BaseArtifactService artifactService, BaseSessionService sessionService, BaseMemoryService memoryService, List<BasePlugin> extraPlugins) Serves the apps ofappLoader. -
RunnerService
public RunnerService(AgentLoader agentProvider, BaseArtifactService artifactService, BaseSessionService sessionService, BaseMemoryService memoryService, List<BasePlugin> extraPlugins) Serves the agents ofagentProvider.
-
-
Method Details
-
listApps
Returns the names of the apps this server serves. -
loadRoot
Returns the root that the appappNameruns: the workflow node it runs, or else its root agent. Empty if there is no such app.- Throws:
IllegalStateException- if the app exists but fails to load
-
getRunner
Gets the Runner instance for a given application name. An app runs under the requested name, with this server's plugins after its own.- Parameters:
appName- The application name requested by the user.- Returns:
- A configured Runner instance.
- Throws:
org.springframework.web.server.ResponseStatusException- with 404 if there is no such app, or 500 if it fails to load
-
onAgentUpdated
Called by hot loader when agents are updated
-