Interface AppLoader

All Known Implementing Classes:
InMemoryAppLoader

@ThreadSafe public interface AppLoader
Loads what the ADK Web Server serves: apps, agents and workflows, each as an App keyed by its app name. An agent is served as an app whose root agent it is, and a workflow as an app whose root node it is.

When the server has an AppLoader, it serves only that loader's apps and ignores any CompiledAgentLoader, though the default one is still created and scans adk.agents.source-dir unless adk.agents.loader names another loader; any other AgentLoader fails startup.

  • Method Summary

    Modifier and Type
    Method
    Description
    com.google.common.collect.ImmutableList<String>
    Returns the names of the available apps, each a valid app name; empty if there are none.
    loadApp(String appName)
    Returns the app served as appName, or empty if there is none.
  • Method Details

    • listApps

      com.google.common.collect.ImmutableList<String> listApps()
      Returns the names of the available apps, each a valid app name; empty if there are none.
    • loadApp

      Optional<App> loadApp(String appName)
      Returns the app served as appName, or empty if there is none.
      Throws:
      IllegalStateException - if the app exists but fails to load