AS AgentScopeAPI 手册 / API Reference

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
runnerRunner运行器(类型 `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
eventContextClosedEvent上下文已关闭事件。the context closed event
源码Source io/agentscope/runtime/lifecycle/RunnerShutdownListener.java:56–86
基于官方固定版本源码静态生成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.