Event
public class Event
源码Source
io/agentscope/runtime/engine/schemas/Event.java:24–99事件 in 智能体运行时的基类。位于 io.agentscope.runtime.engine.schemas 包。核心成员包括 getSequenceNumber、setSequenceNumber、getObject、setObject、getStatus、setStatus。
Base class for events in the agent runtime.
字段摘要Field Summary
| 字段Field | 类型Type | 说明Description |
|---|---|---|
status | String | 状态字段。 The status field. |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public Integer getSequenceNumber() | 获取 `getSequenceNumber`。 Returns the sequence number. |
public void setSequenceNumber(Integer sequenceNumber) | 设置 `setSequenceNumber`。 Sets the sequence number. |
public String getObject() | 获取对象。 Returns the object. |
public void setObject(String object) | 设置对象。 Sets the object. |
public String getStatus() | 获取状态。 Returns the status. |
public void setStatus(String status) | 设置状态。 Sets the status. |
public Error getError() | 获取错误。 Returns the error. |
public void setError(Error error) | 设置错误。 Sets the error. |
public Event created() | 返回已创建。 Returns the created. |
public Event inProgress() | 将响应状态设置为进行中。 Returns the in progress. |
public Event completed() | 返回已完成。 Returns the completed. |
public Event failed(Error error) | 设置失败。 Performs the failed operation. |
public Event rejected() | 返回已拒绝。 Returns the rejected. |
public Event canceled() | 返回 `canceled` 结果。 Returns the canceled. |
字段详情Field Detail
status
@JsonProperty("status") protected String status
状态字段。声明为 @JsonProperty("status") protected String status。
The status field.
源码Source
io/agentscope/runtime/engine/schemas/Event.java:31–32方法详情Method Detail
getSequenceNumber
public Integer getSequenceNumber()
获取 getSequenceNumber。
Returns the sequence number.
Integer返回数值结果。Returns a numeric result.
源码Source
io/agentscope/runtime/engine/schemas/Event.java:37–39setSequenceNumber
public void setSequenceNumber(Integer sequenceNumber)
设置 setSequenceNumber。
Sets the sequence number.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
sequenceNumber | Integer | sequence 数量(类型 `Integer`)。The sequence number. |
源码Source
io/agentscope/runtime/engine/schemas/Event.java:41–43getObject
public String getObject()
获取对象。
Returns the object.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/runtime/engine/schemas/Event.java:45–47setObject
public void setObject(String object)
设置对象。
Sets the object.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
object | String | 对象(类型 `String`)。The object. |
源码Source
io/agentscope/runtime/engine/schemas/Event.java:49–51getStatus
public String getStatus()
获取状态。
Returns the status.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/runtime/engine/schemas/Event.java:53–55setStatus
public void setStatus(String status)
设置状态。
Sets the status.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
status | String | 状态(类型 `String`)。The status. |
源码Source
io/agentscope/runtime/engine/schemas/Event.java:57–59getError
public Error getError()
获取错误。
Returns the error.
Error返回错误。Returns error.
源码Source
io/agentscope/runtime/engine/schemas/Event.java:61–63setError
public void setError(Error error)
设置错误。
Sets the error.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
error | Error | 错误(类型 `Error`)。The error. |
源码Source
io/agentscope/runtime/engine/schemas/Event.java:65–67created
public Event created()
返回已创建。
Returns the created.
Event返回事件。Returns event.
源码Source
io/agentscope/runtime/engine/schemas/Event.java:69–72inProgress
public Event inProgress()
将响应状态设置为进行中。
Returns the in progress.
Event返回事件。Returns event.
源码Source
io/agentscope/runtime/engine/schemas/Event.java:74–77completed
public Event completed()
返回已完成。
Returns the completed.
Event返回事件。Returns event.
源码Source
io/agentscope/runtime/engine/schemas/Event.java:79–82failed
public Event failed(Error error)
设置失败。
Performs the failed operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
error | Error | 错误(类型 `Error`)。The error. |
Event返回事件。Returns event.
源码Source
io/agentscope/runtime/engine/schemas/Event.java:84–88rejected
public Event rejected()
返回已拒绝。
Returns the rejected.
Event返回事件。Returns event.
源码Source
io/agentscope/runtime/engine/schemas/Event.java:90–93canceled
public Event canceled()
返回 canceled 结果。
Returns the canceled.
Event返回事件。Returns event.
源码Source
io/agentscope/runtime/engine/schemas/Event.java:95–98