Module swim.runtime

Class AgentView

  • All Implemented Interfaces:
    swim.api.agent.AgentContext, swim.api.downlink.DownlinkFactory, swim.api.lane.LaneFactory, swim.api.ref.SwimRef, swim.api.store.Store, CellContext, TierBinding, TierContext, swim.util.Log

    public class AgentView
    extends AbstractTierBinding
    implements TierContext, swim.api.agent.AgentContext
    • Field Detail

      • id

        protected final swim.structure.Value id
      • props

        protected final swim.structure.Value props
      • agent

        protected swim.api.agent.Agent agent
    • Constructor Detail

      • AgentView

        public AgentView​(AgentModel node,
                         swim.structure.Value id,
                         swim.structure.Value props)
    • Method Detail

      • agent

        public final swim.api.agent.Agent agent()
      • unwrapNode

        public <T> T unwrapNode​(Class<T> nodeClass)
      • bottomNode

        public <T> T bottomNode​(Class<T> nodeClass)
      • meshUri

        public final swim.uri.Uri meshUri()
        Specified by:
        meshUri in interface CellContext
      • hostUri

        public final swim.uri.Uri hostUri()
        Specified by:
        hostUri in interface swim.api.agent.AgentContext
      • nodeUri

        public final swim.uri.Uri nodeUri()
        Specified by:
        nodeUri in interface swim.api.agent.AgentContext
      • agentId

        public final swim.structure.Value agentId()
        Specified by:
        agentId in interface swim.api.agent.AgentContext
      • props

        public final swim.structure.Value props()
        Specified by:
        props in interface swim.api.agent.AgentContext
      • getProp

        public swim.structure.Value getProp​(swim.structure.Value key)
        Specified by:
        getProp in interface swim.api.agent.AgentContext
      • getProp

        public swim.structure.Value getProp​(String name)
        Specified by:
        getProp in interface swim.api.agent.AgentContext
      • policy

        public swim.api.policy.Policy policy()
        Specified by:
        policy in interface CellContext
      • schedule

        public swim.concurrent.Schedule schedule()
        Specified by:
        schedule in interface swim.api.agent.AgentContext
        Specified by:
        schedule in interface CellContext
      • stage

        public swim.concurrent.Stage stage()
        Specified by:
        stage in interface swim.api.agent.AgentContext
        Specified by:
        stage in interface CellContext
      • asyncStage

        public swim.concurrent.Stage asyncStage()
        Specified by:
        asyncStage in interface swim.api.agent.AgentContext
      • store

        public swim.store.StoreBinding store()
        Specified by:
        store in interface CellContext
      • lane

        public swim.api.Lane lane()
        Specified by:
        lane in interface swim.api.agent.AgentContext
      • link

        public swim.api.Link link()
        Specified by:
        link in interface swim.api.agent.AgentContext
      • getLane

        public swim.api.Lane getLane​(swim.uri.Uri laneUri)
        Specified by:
        getLane in interface swim.api.agent.AgentContext
      • openLane

        public swim.api.Lane openLane​(swim.uri.Uri laneUri,
                                      swim.api.Lane lane)
        Specified by:
        openLane in interface swim.api.agent.AgentContext
      • agents

        public swim.collections.FingerTrieSeq<swim.api.agent.Agent> agents()
        Specified by:
        agents in interface swim.api.agent.AgentContext
      • getAgent

        public swim.api.agent.Agent getAgent​(swim.structure.Value id)
        Specified by:
        getAgent in interface swim.api.agent.AgentContext
      • getAgent

        public swim.api.agent.Agent getAgent​(String name)
        Specified by:
        getAgent in interface swim.api.agent.AgentContext
      • getAgent

        public <A extends swim.api.agent.Agent> A getAgent​(Class<? extends A> agentClass)
        Specified by:
        getAgent in interface swim.api.agent.AgentContext
      • createAgentFactory

        public <A extends swim.api.agent.Agent> swim.api.agent.AgentFactory<A> createAgentFactory​(Class<? extends A> agentClass)
      • openAgent

        public <A extends swim.api.agent.Agent> A openAgent​(swim.structure.Value id,
                                                            swim.structure.Value props,
                                                            swim.api.agent.AgentFactory<A> agentFactory)
        Specified by:
        openAgent in interface swim.api.agent.AgentContext
      • openAgent

        public <A extends swim.api.agent.Agent> A openAgent​(swim.structure.Value id,
                                                            swim.api.agent.AgentFactory<A> agentFactory)
        Specified by:
        openAgent in interface swim.api.agent.AgentContext
      • openAgent

        public <A extends swim.api.agent.Agent> A openAgent​(String name,
                                                            swim.api.agent.AgentFactory<A> agentFactory)
        Specified by:
        openAgent in interface swim.api.agent.AgentContext
      • openAgent

        public <A extends swim.api.agent.Agent> A openAgent​(swim.structure.Value id,
                                                            swim.structure.Value props,
                                                            Class<? extends A> agentClass)
        Specified by:
        openAgent in interface swim.api.agent.AgentContext
      • openAgent

        public <A extends swim.api.agent.Agent> A openAgent​(swim.structure.Value id,
                                                            Class<? extends A> agentClass)
        Specified by:
        openAgent in interface swim.api.agent.AgentContext
      • openAgent

        public <A extends swim.api.agent.Agent> A openAgent​(String name,
                                                            Class<? extends A> agentClass)
        Specified by:
        openAgent in interface swim.api.agent.AgentContext
      • closeAgent

        public void closeAgent​(swim.structure.Value id)
        Specified by:
        closeAgent in interface swim.api.agent.AgentContext
      • closeAgent

        public void closeAgent​(String name)
        Specified by:
        closeAgent in interface swim.api.agent.AgentContext
      • commandLane

        public <V> swim.api.lane.CommandLane<V> commandLane()
        Specified by:
        commandLane in interface swim.api.lane.LaneFactory
      • demandLane

        public <V> swim.api.lane.DemandLane<V> demandLane()
        Specified by:
        demandLane in interface swim.api.lane.LaneFactory
      • demandMapLane

        public <K,​V> swim.api.lane.DemandMapLane<K,​V> demandMapLane()
        Specified by:
        demandMapLane in interface swim.api.lane.LaneFactory
      • httpLane

        public <V> swim.api.http.HttpLane<V> httpLane()
        Specified by:
        httpLane in interface swim.api.lane.LaneFactory
      • joinMapLane

        public <L,​K,​V> swim.api.lane.JoinMapLane<L,​K,​V> joinMapLane()
        Specified by:
        joinMapLane in interface swim.api.lane.LaneFactory
      • joinValueLane

        public <K,​V> swim.api.lane.JoinValueLane<K,​V> joinValueLane()
        Specified by:
        joinValueLane in interface swim.api.lane.LaneFactory
      • listLane

        public <V> swim.api.lane.ListLane<V> listLane()
        Specified by:
        listLane in interface swim.api.lane.LaneFactory
      • mapLane

        public <K,​V> swim.api.lane.MapLane<K,​V> mapLane()
        Specified by:
        mapLane in interface swim.api.lane.LaneFactory
      • spatialLane

        public <K,​S,​V> swim.api.lane.SpatialLane<K,​S,​V> spatialLane​(swim.math.Z2Form<S> shapeForm)
        Specified by:
        spatialLane in interface swim.api.lane.LaneFactory
      • geospatialLane

        public <K,​V> swim.api.lane.SpatialLane<K,​swim.math.R2Shape,​V> geospatialLane()
        Specified by:
        geospatialLane in interface swim.api.lane.LaneFactory
      • supplyLane

        public <V> swim.api.lane.SupplyLane<V> supplyLane()
        Specified by:
        supplyLane in interface swim.api.lane.LaneFactory
      • valueLane

        public <V> swim.api.lane.ValueLane<V> valueLane()
        Specified by:
        valueLane in interface swim.api.lane.LaneFactory
      • wsLane

        public <I,​O> swim.api.ws.WsLane<I,​O> wsLane()
        Specified by:
        wsLane in interface swim.api.lane.LaneFactory
      • listData

        public swim.api.data.ListData<swim.structure.Value> listData​(swim.structure.Value name)
        Specified by:
        listData in interface swim.api.store.Store
      • listData

        public swim.api.data.ListData<swim.structure.Value> listData​(String name)
        Specified by:
        listData in interface swim.api.store.Store
      • mapData

        public swim.api.data.MapData<swim.structure.Value,​swim.structure.Value> mapData​(swim.structure.Value name)
        Specified by:
        mapData in interface swim.api.store.Store
      • mapData

        public swim.api.data.MapData<swim.structure.Value,​swim.structure.Value> mapData​(String name)
        Specified by:
        mapData in interface swim.api.store.Store
      • spatialData

        public <S> swim.api.data.SpatialData<swim.structure.Value,​S,​swim.structure.Value> spatialData​(swim.structure.Value name,
                                                                                                                  swim.math.Z2Form<S> shapeForm)
        Specified by:
        spatialData in interface swim.api.store.Store
      • spatialData

        public <S> swim.api.data.SpatialData<swim.structure.Value,​S,​swim.structure.Value> spatialData​(String name,
                                                                                                                  swim.math.Z2Form<S> shapeForm)
        Specified by:
        spatialData in interface swim.api.store.Store
      • geospatialData

        public swim.api.data.SpatialData<swim.structure.Value,​swim.math.R2Shape,​swim.structure.Value> geospatialData​(swim.structure.Value name)
        Specified by:
        geospatialData in interface swim.api.store.Store
      • geospatialData

        public swim.api.data.SpatialData<swim.structure.Value,​swim.math.R2Shape,​swim.structure.Value> geospatialData​(String name)
        Specified by:
        geospatialData in interface swim.api.store.Store
      • valueData

        public swim.api.data.ValueData<swim.structure.Value> valueData​(swim.structure.Value name)
        Specified by:
        valueData in interface swim.api.store.Store
      • valueData

        public swim.api.data.ValueData<swim.structure.Value> valueData​(String name)
        Specified by:
        valueData in interface swim.api.store.Store
      • trace

        public void trace​(Object message)
        Specified by:
        trace in interface swim.util.Log
      • debug

        public void debug​(Object message)
        Specified by:
        debug in interface swim.util.Log
      • info

        public void info​(Object message)
        Specified by:
        info in interface swim.util.Log
      • warn

        public void warn​(Object message)
        Specified by:
        warn in interface swim.util.Log
      • error

        public void error​(Object message)
        Specified by:
        error in interface swim.util.Log
      • fail

        public void fail​(Object message)
        Specified by:
        fail in interface swim.util.Log