Class NodeViewAgent

All Implemented Interfaces:
Node

@Experimental public final class NodeViewAgent extends BaseAgent
这是一个只读代理(read-only agent),用于替代那些不支持代理功能的工作流节点(non-agent workflow nodes)。这样,当应用程序(app)、运行器(runner)或调用系统(invocation)执行相关节点时,读取该代理代码的程序仍能正常运行。这个代理本身永远不会被执行;实际执行节点任务的仍然是运行器本身。
  • 构造函数详细信息

    • NodeViewAgent

      public NodeViewAgent(Node node)
      创建一个代理(agent),用于代表用户或系统执行某些操作。 node使用该组件的名称和描述来进行操作。
      Throws:
      IllegalArgumentException - if node is an agent, or if its name is not a valid agent name.
  • 方法详细信息(Method Details)

    • node

      public Node node()
      返回该代理所代表的节点。
    • runAsync

      public io.reactivex.rxjava3.core.Flowable<Event> runAsync(InvocationContext parentContext)
      描述内容复制自相关类: BaseAgent
      异步运行代理程序。
      Overrides:
      runAsync in class BaseAgent
      Parameters:
      parentContext - Parent context to inherit.
      Returns:
      stream of agent-generated events.
    • runLive

      public io.reactivex.rxjava3.core.Flowable<Event> runLive(InvocationContext parentContext)
      描述内容复制自相关类: BaseAgent
      同步运行代理程序。
      Overrides:
      runLive in class BaseAgent
      Parameters:
      parentContext - Parent context to inherit.
      Returns:
      stream of agent-generated events.
    • runAsyncImpl

      protected io.reactivex.rxjava3.core.Flowable<Event> runAsyncImpl(InvocationContext invocationContext)
      描述内容复制自相关类: BaseAgent
      与特定代理(Agent)相关的异步逻辑(Agent-specific asynchronous logic)。
      Specified by:
      runAsyncImpl in class BaseAgent
      Parameters:
      invocationContext - Current invocation context.
      Returns:
      stream of agent-generated events.
    • runLiveImpl

      protected io.reactivex.rxjava3.core.Flowable<Event> runLiveImpl(InvocationContext invocationContext)
      描述内容复制自相关类: BaseAgent
      与特定代理相关的同步逻辑(Agent-specific synchronous logic)。
      Specified by:
      runLiveImpl in class BaseAgent
      Parameters:
      invocationContext - Current invocation context.
      Returns:
      stream of agent-generated events.