Class NodeViewAgent

All Implemented Interfaces:
Node

@Experimental public final class NodeViewAgent extends BaseAgent
A read-only agent that stands in for a non-agent workflow node so code reading the agent of an app, runner, or invocation keeps working when they run a node. It never runs; the runner runs the node itself.
  • Constructor Details

    • NodeViewAgent

      public NodeViewAgent(Node node)
      Creates an agent that stands in for node, using its name and description.
      Throws:
      IllegalArgumentException - if node is an agent, or if its name is not a valid agent name.
  • Method Details

    • node

      public Node node()
      Returns the node this agent stands in for.
    • runAsync

      public io.reactivex.rxjava3.core.Flowable<Event> runAsync(InvocationContext parentContext)
      Description copied from class: BaseAgent
      Runs the agent asynchronously.
      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)
      Description copied from class: BaseAgent
      Runs the agent synchronously.
      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)
      Description copied from class: BaseAgent
      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)
      Description copied from class: BaseAgent
      Agent-specific synchronous logic.
      Specified by:
      runLiveImpl in class BaseAgent
      Parameters:
      invocationContext - Current invocation context.
      Returns:
      stream of agent-generated events.