CachedAccessToken
public record CachedAccessToken(String value, long refreshAtMs)
源码Source
io/agentscope/extensions/channel/common/CachedAccessToken.java:29–34承载已缓存访问令牌数据的记录类型。位于 io.agentscope.extensions.channel.common 包。核心成员包括 value、refreshAtMs、CachedAccessToken。
A platform access token together with the refresh deadline chosen by the provider that fetched it.
记录组件摘要Record Component Summary
| 组件Component | 类型Type | 说明Description |
|---|---|---|
value | String | 执行值相关操作。 the token string accepted by the platform API; never `null` — absence of a
token is represented by `AccessTokenStore#get()` returning `null` |
refreshAtMs | long | 执行刷新 At Ms相关操作。 wall-clock epoch milliseconds after which the owning provider fetches a new
token instead of returning this one |
构造器摘要Constructor Summary
| 构造器Constructor | 说明Description |
|---|---|
public CachedAccessToken(String value, long refreshAtMs) | 初始化 `CachedAccessToken` 实例。 Creates a new instance. |
记录组件详情Record Component Detail
value
String value执行值相关操作。
the token string accepted by the platform API; never null — absence of a
token is represented by AccessTokenStore#get() returning null
源码Source
io/agentscope/extensions/channel/common/CachedAccessToken.java:29–34refreshAtMs
long refreshAtMs执行刷新 At Ms相关操作。
wall-clock epoch milliseconds after which the owning provider fetches a new token instead of returning this one
源码Source
io/agentscope/extensions/channel/common/CachedAccessToken.java:29–34构造器详情Constructor Detail
CachedAccessToken
public CachedAccessToken(String value, long refreshAtMs)
初始化 CachedAccessToken 实例。
Creates a new instance.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
value | String | 值(类型 `String`)。The value. |
refreshAtMs | long | 刷新 At Ms(类型 `long`)。The refresh at ms. |
源码Source
io/agentscope/extensions/channel/common/CachedAccessToken.java:31–33