- All Superinterfaces:
DownlinkFactory
,LaneFactory
,Log
,Store
,WarpRef
- All Known Implementing Classes:
AgentView
Internal context that enables URI-based addressability, contextual
Lane
and Store
creation mechanisms, logging, and scheduling to some
Agent
.-
Method Summary
Modifier and TypeMethodDescriptionagentId()
agents()
The multi-threaded executionStage
on which thisAgentContext
can run asynchronous operations.void
closeAgent
(String name) void
closeAgent
(Value id) <A extends Agent>
AReturns theLane
belonging to theAgent
managed by thisAgentContext
that is addressable bylaneUri
, ornull
if no suchLane
exists.Returns the value ofname
inprops()
.Returns the value ofkey
inprops()
.hostUri()
ThehostUri
of theAgent
managed by thisAgentContext
.lane()
Returns the currently executing lane, or null if not currently executing a lane or link callback.link()
Returns the currently executing link, or null if not currently executing a link callback.nodeUri()
ThenodeUri
of theAgent
managed by thisAgentContext
.<A extends Agent>
A<A extends Agent>
AopenAgent
(String name, AgentFactory<A> agentFactory) <A extends Agent>
A<A extends Agent>
AopenAgent
(Value id, AgentFactory<A> agentFactory) <A extends Agent>
A<A extends Agent>
AopenAgent
(Value id, Value props, AgentFactory<A> agentFactory) Registerslane
withlaneUri
and returnslane
.props()
ARecord
that maps every dynamic property innodeUri()
, as defined byAgentRoute.pattern()
, to its value.schedule()
TheSchedule
that thisAgentContext
is bound to.stage()
The single-threaded executionStage
on which thisAgentContext
runs its application logic.Methods inherited from interface swim.api.downlink.DownlinkFactory
downlink, downlinkHttp, downlinkList, downlinkMap, downlinkValue, downlinkWs
Methods inherited from interface swim.api.lane.LaneFactory
commandLane, demandLane, demandMapLane, geospatialLane, httpLane, joinMapLane, joinValueLane, listLane, mapLane, spatialLane, supplyLane, valueLane, wsLane
Methods inherited from interface swim.api.store.Store
geospatialData, geospatialData, listData, listData, mapData, mapData, spatialData, spatialData, valueData, valueData
-
Method Details
-
hostUri
Uri hostUri()ThehostUri
of theAgent
managed by thisAgentContext
. -
nodeUri
Uri nodeUri()ThenodeUri
of theAgent
managed by thisAgentContext
. -
agentId
Value agentId() -
props
Value props()ARecord
that maps every dynamic property innodeUri()
, as defined byAgentRoute.pattern()
, to its value. An empty result indicates thatnodeUri
contains no dynamic components. -
getProp
Returns the value ofkey
inprops()
. -
getProp
Returns the value ofname
inprops()
. -
schedule
Schedule schedule()TheSchedule
that thisAgentContext
is bound to. -
stage
Stage stage()The single-threaded executionStage
on which thisAgentContext
runs its application logic. -
asyncStage
Stage asyncStage()The multi-threaded executionStage
on which thisAgentContext
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
Returns theLane
belonging to theAgent
managed by thisAgentContext
that is addressable bylaneUri
, ornull
if no suchLane
exists. -
openLane
Registerslane
withlaneUri
and returnslane
. -
agents
FingerTrieSeq<Agent> agents() -
getAgent
-
getAgent
-
getAgent
-
openAgent
-
openAgent
-
openAgent
-
openAgent
-
openAgent
-
openAgent
-
closeAgent
-
closeAgent
-