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.
      • schedule

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

        Stage stage()
        The Stage that this AgentContext is bound to.
      • 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)
      • addAgent

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

        <A extends Agent> A addAgent​(String name,
                                     Class<? extends A> agentClass)
      • removeAgent

        void removeAgent​(Value props)
      • removeAgent

        void removeAgent​(String name)