Class RunnerService

java.lang.Object
com.google.adk.web.service.RunnerService

@Component public class RunnerService extends Object
Serves the configured apps, and creates and caches a Runner for each.
  • Constructor Details

  • Method Details

    • listApps

      public com.google.common.collect.ImmutableList<String> listApps()
      Returns the names of the apps this server serves.
    • loadRoot

      @Experimental public Optional<Node> loadRoot(String appName)
      Returns the root that the app appName runs: 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

      public Runner getRunner(String appName)
      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

      public void onAgentUpdated(String agentName)
      Called by hot loader when agents are updated