AS AgentScopeAPI 手册 / API Reference

Service

public interface Service
源码Source io/agentscope/runtime/engine/shared/Service.java:23–45

定义服务契约的接口。位于 io.agentscope.runtime.engine.shared 包。核心成员包括 start、stop、health。

Service interface that defines basic methods that all services must implement

方法摘要Method Summary

方法Method说明Description
public CompletableFuture<Void> start()
返回启动。
Start the service, initialize necessary resources or connections
public CompletableFuture<Void> stop()
返回停止。
Stop the service, release acquired resources
public CompletableFuture<Boolean> health()
检查健康状态状态的服务。
Check the health status of the service

方法详情Method Detail

start

public CompletableFuture<Void> start()

返回启动。

Start the service, initialize necessary resources or connections

返回Returns CompletableFuture<Void>
返回CompletableFuture。CompletableFuture asynchronous startup result
源码Source io/agentscope/runtime/engine/shared/Service.java:30

stop

public CompletableFuture<Void> stop()

返回停止。

Stop the service, release acquired resources

返回Returns CompletableFuture<Void>
返回CompletableFuture。CompletableFuture asynchronous stop result
源码Source io/agentscope/runtime/engine/shared/Service.java:37

health

public CompletableFuture<Boolean> health()

检查健康状态状态的服务。

Check the health status of the service

返回Returns CompletableFuture<Boolean>
返回CompletableFuture。CompletableFuture asynchronous health check result, true indicates healthy, false indicates unhealthy
源码Source io/agentscope/runtime/engine/shared/Service.java:44
基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.