类 RequestContext

java.lang.Object
io.github.a2ap.core.model.RequestContext

public class RequestContext extends Object
Represents the execution context for a request being processed by an agent. This class encapsulates all the contextual information needed for an agent to process a request, including the original request parameters, current task state, and any related tasks. It serves as a comprehensive data container that is passed to agent executors and other processing components. Key components: - taskId: Unique identifier for the primary task being processed - contextId: Optional session or conversation identifier for grouping related tasks - request: Original message send parameters that initiated the task - task: Current snapshot of the task state (may need reloading for latest state) - relatedTasks: Additional tasks that are part of the same processing context The context provides a snapshot view of the task state at the time of handler invocation. For operations requiring the absolute latest state, components should reload the task from the persistent store. This design enables stateful request processing while maintaining clear separation between request parameters, execution state, and related task information.
  • 构造器详细资料

  • 方法详细资料

    • builder

      public static RequestContext.Builder builder()
    • getTaskId

      public String getTaskId()
    • setTaskId

      public void setTaskId(String taskId)
    • getContextId

      public String getContextId()
    • setContextId

      public void setContextId(String contextId)
    • getRequest

      public MessageSendParams getRequest()
    • setRequest

      public void setRequest(MessageSendParams request)
    • getTask

      public Task getTask()
    • setTask

      public void setTask(Task task)
    • getRelatedTasks

      public List<Task> getRelatedTasks()
    • setRelatedTasks

      public void setRelatedTasks(List<Task> relatedTasks)
    • equals

      public boolean equals(Object o)
      覆盖:
      equals 在类中 Object
    • hashCode

      public int hashCode()
      覆盖:
      hashCode 在类中 Object
    • toString

      public String toString()
      覆盖:
      toString 在类中 Object