Module swim.api

Interface AgentContext

    • Method Detail

      • hostUri

        Uri hostUri()
        The hostUri of the Agent managed by this AgentContext.
      • nodeUri

        Uri nodeUri()
        The nodeUri of the Agent managed by this AgentContext.
      • agentId

        Value agentId()
      • schedule

        Schedule schedule()
        The Schedule that this AgentContext is bound to.
      • stage

        Stage stage()
        The single-threaded execution Stage on which this AgentContext runs its application logic.
      • asyncStage

        Stage asyncStage()
        The multi-threaded execution Stage on which this AgentContext can run asynchronous operations.
      • lane

        Lane lane()
        Returns the currently executing lane, or null if not currently executing a lane or link callback.
      • link

        Link link()
        Returns the currently executing link, or null if not currently executing a link callback.
      • getLane

        Lane getLane​(Uri laneUri)
        Returns the Lane belonging to the Agent managed by this AgentContext that is addressable by laneUri, or null if no such Lane exists.
      • openLane

        Lane openLane​(Uri laneUri,
                      Lane lane)
        Registers lane with laneUri and returns lane.
      • getAgent

        <A extends Agent> A getAgent​(Class<? extends A> agentClass)
      • openAgent

        <A extends Agent> A openAgent​(Value id,
                                      Value props,
                                      Class<? extends A> agentClass)
      • openAgent

        <A extends Agent> A openAgent​(Value id,
                                      Class<? extends A> agentClass)
      • openAgent

        <A extends Agent> A openAgent​(String name,
                                      Class<? extends A> agentClass)
      • closeAgent

        void closeAgent​(Value id)
      • closeAgent

        void closeAgent​(String name)