RunnerShutdownListener
@Component public class RunnerShutdownListener implements ApplicationListener<ContextClosedEvent>
源码Source
io/agentscope/runtime/lifecycle/RunnerShutdownListener.java:32–87运行器 Shutdown 监听器,承载智能体的部署、调度与服务化运行。位于 io.agentscope.runtime.lifecycle 包,实现 ApplicationListener<ContextClosedEvent>。核心成员包括 onApplicationEvent、RunnerShutdownListener。
Separate listener for application shutdown events.
构造器摘要Constructor Summary
| 构造器Constructor | 说明Description |
|---|---|
public RunnerShutdownListener(Runner runner) | 初始化 `RunnerShutdownListener` 实例。 Constructor with Runner dependency injection. |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public void onApplicationEvent(ContextClosedEvent event) | 处理应用事件事件。 Handle application shutdown event. |
构造器详情Constructor Detail
RunnerShutdownListener
public RunnerShutdownListener(Runner runner)
初始化 RunnerShutdownListener 实例。
Constructor with Runner dependency injection.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
runner | Runner | 运行器(类型 `Runner`)。the Runner instance (optional, may be null if not configured) |
源码Source
io/agentscope/runtime/lifecycle/RunnerShutdownListener.java:44–47方法详情Method Detail
onApplicationEvent
public void onApplicationEvent(ContextClosedEvent event)
处理应用事件事件。
Handle application shutdown event.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
event | ContextClosedEvent | 上下文已关闭事件。the context closed event |
源码Source
io/agentscope/runtime/lifecycle/RunnerShutdownListener.java:56–86