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
CompletableFuture<Void>返回CompletableFuture。CompletableFuture asynchronous startup result
源码Source
io/agentscope/runtime/engine/shared/Service.java:30stop
public CompletableFuture<Void> stop()
返回停止。
Stop the service, release acquired resources
CompletableFuture<Void>返回CompletableFuture。CompletableFuture asynchronous stop result
源码Source
io/agentscope/runtime/engine/shared/Service.java:37health
public CompletableFuture<Boolean> health()
检查健康状态状态的服务。
Check the health status of the service
CompletableFuture<Boolean>返回CompletableFuture。CompletableFuture asynchronous health check result, true indicates healthy, false indicates unhealthy
源码Source
io/agentscope/runtime/engine/shared/Service.java:44