AdkAPI服务器

open class AdkApiServer(config: AdkServerConfig)

The Development UI stays unmounted unless AdkServerConfig.webUiEnabled or the adk.web.ui.enabled property asks for it.

AdkDevServer widens the surface with the development-only endpoints. start and stop are safe to call from different threads; a stop arriving while start is still binding aborts it, and a failed start leaves the engine recorded, so call stop before retrying.

Inheritors

构造函数(Constructors)

Link copied to clipboard
constructor(config: AdkServerConfig)

函数

Link copied to clipboard
fun start(wait: Boolean = false)

在……上启动服务器。 AdkServerConfig.host 和 AdkServerConfig.port;当……的时候 wait 如果该操作的结果为“true”,程序将一直处于阻塞状态,直到服务器停止运行。在服务器停止之前,如果再次调用该操作,程序仍会继续处于阻塞状态。 停止 即使启动失败后,它也不会执行任何操作(即什么都不会做)。

Link copied to clipboard
fun stop()

停止发动机;随后会进入等待状态。 adkApiModule 用于“刷新”(或清除)某些数据或状态。 AdkServerConfig.sessionService 此外,还有缓冲式遥测功能:在会话数据被刷新的过程中,系统会额外等待最多 3 秒的时间,以确保用户可以取消操作(即停止数据刷新)。