Builder
public static final class Builder
源码Source
io/agentscope/harness/agent/subagent/task/RemoteSubmitContext.java:106–152构建器,用于构建并配置目标实例。位于 io.agentscope.harness.agent.subagent.task 包。核心成员包括 userId、parentSessionId、stream、detail、denyRules、attributes。
A class in io.agentscope.harness.agent.subagent.task that supports discovery, delegation and collaboration between agents. Declared in io.agentscope.harness.agent.subagent.task.
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public Builder userId(String userId) | 设置用户标识。 Performs the user id operation. |
public Builder parentSessionId(String parentSessionId) | 设置父级会话标识。 Performs the parent session id operation. |
public Builder stream(boolean stream) | 设置流。 Performs the stream operation. |
public Builder detail(String detail) | 设置详情。 Performs the detail operation. |
public Builder denyRules(List<Map<String, String>> denyRules) | 设置拒绝规则。 Performs the deny rules operation. |
public Builder attributes(Map<String, Object> attributes) | 设置属性。 Caller-defined attributes sent as `context.attributes`, kept apart from the
protocol's own context fields. |
public RemoteSubmitContext build() | 构建并返回最终实例。 Creates and returns an instance. |
方法详情Method Detail
userId
public Builder userId(String userId)
设置用户标识。
Performs the user id operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
userId | String | 用户标识(类型 `String`)。The user id. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/harness/agent/subagent/task/RemoteSubmitContext.java:114–117parentSessionId
public Builder parentSessionId(String parentSessionId)
设置父级会话标识。
Performs the parent session id operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
parentSessionId | String | 父级会话标识(类型 `String`)。The parent session id. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/harness/agent/subagent/task/RemoteSubmitContext.java:119–122stream
public Builder stream(boolean stream)
设置流。
Performs the stream operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
stream | boolean | 流(类型 `boolean`)。The stream. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/harness/agent/subagent/task/RemoteSubmitContext.java:124–127detail
public Builder detail(String detail)
设置详情。
Performs the detail operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
detail | String | 详情(类型 `String`)。The detail. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/harness/agent/subagent/task/RemoteSubmitContext.java:129–132denyRules
public Builder denyRules(List<Map<String, String>> denyRules)
设置拒绝规则。
Performs the deny rules operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
denyRules | List<Map<String, String>> | 拒绝规则(类型 `List >`)。The deny rules. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/harness/agent/subagent/task/RemoteSubmitContext.java:134–137attributes
public Builder attributes(Map<String, Object> attributes)
设置属性。
Caller-defined attributes sent as context.attributes, kept apart from the protocol's own context fields.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
attributes | Map<String, Object> | 属性(类型 `Map`)。The attributes. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/harness/agent/subagent/task/RemoteSubmitContext.java:143–146build
public RemoteSubmitContext build()
构建并返回最终实例。
Creates and returns an instance.
RemoteSubmitContext返回RemoteSubmitContext。Returns remote submit context.
源码Source
io/agentscope/harness/agent/subagent/task/RemoteSubmitContext.java:148–151