AS AgentScopeAPI 手册 / API Reference

TurnLease

public interface TurnLease extends AutoCloseable
源码Source io/agentscope/harness/agent/gateway/TurnLease.java:25–34

定义轮次 Lease契约的接口。位于 io.agentscope.harness.agent.gateway 包,实现 AutoCloseable。核心成员包括 close。

A handle representing an acquired session turn slot.

Returned by SessionTurnGate#acquire(String). The gateway closes the lease in doFinally after the turn completes. Implementations must be idempotent: calling #close() more than once must be safe.

方法摘要Method Summary

方法Method说明Description
public void close()
关闭连接并释放相关资源。
Releases the turn slot held by this lease.

方法详情Method Detail

close

public void close()

关闭连接并释放相关资源。

Releases the turn slot held by this lease.

源码Source io/agentscope/harness/agent/gateway/TurnLease.java:32–33
基于官方固定版本源码静态生成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.