- All Superinterfaces:
DownlinkFactory,LaneFactory,swim.util.Log,Store,WarpRef
Internal context that enables URI-based addressability, contextual
Lane and Store creation mechanisms, logging, and scheduling to some
Agent.-
Method Summary
Modifier and TypeMethodDescriptionswim.structure.ValueagentId()swim.collections.FingerTrieSeq<Agent>agents()swim.concurrent.StageThe multi-threaded executionStageon which thisAgentContextcan run asynchronous operations.voidcloseAgent(String name) voidcloseAgent(swim.structure.Value id) <A extends Agent>
AgetAgent(swim.structure.Value id) getLane(swim.uri.Uri laneUri) Returns theLanebelonging to theAgentmanaged by thisAgentContextthat is addressable bylaneUri, ornullif no suchLaneexists.swim.structure.ValueReturns the value ofnameinprops().swim.structure.ValuegetProp(swim.structure.Value key) Returns the value ofkeyinprops().swim.uri.UrihostUri()ThehostUriof theAgentmanaged 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.swim.uri.UrinodeUri()ThenodeUriof theAgentmanaged by thisAgentContext.<A extends Agent>
A<A extends Agent>
AopenAgent(String name, AgentFactory<A> agentFactory) <A extends Agent>
A<A extends Agent>
AopenAgent(swim.structure.Value id, AgentFactory<A> agentFactory) <A extends Agent>
A<A extends Agent>
AopenAgent(swim.structure.Value id, swim.structure.Value props, AgentFactory<A> agentFactory) RegisterslanewithlaneUriand returnslane.swim.structure.Valueprops()ARecordthat maps every dynamic property innodeUri(), as defined byAgentRoute.pattern(), to its value.swim.concurrent.Scheduleschedule()TheSchedulethat thisAgentContextis bound to.swim.concurrent.Stagestage()The single-threaded executionStageon which thisAgentContextruns its application logic.Methods inherited from interface swim.api.downlink.DownlinkFactory
downlink, downlinkHttp, downlinkList, downlinkMap, downlinkValue, downlinkWsMethods inherited from interface swim.api.lane.LaneFactory
commandLane, demandLane, demandMapLane, geospatialLane, httpLane, joinMapLane, joinValueLane, listLane, mapLane, spatialLane, supplyLane, valueLane, wsLaneMethods inherited from interface swim.util.Log
debug, error, fail, info, trace, warnMethods inherited from interface swim.api.store.Store
geospatialData, geospatialData, listData, listData, mapData, mapData, spatialData, spatialData, valueData, valueData
-
Method Details
-
hostUri
swim.uri.Uri hostUri()ThehostUriof theAgentmanaged by thisAgentContext. -
nodeUri
swim.uri.Uri nodeUri()ThenodeUriof theAgentmanaged by thisAgentContext. -
agentId
swim.structure.Value agentId() -
props
swim.structure.Value props()ARecordthat maps every dynamic property innodeUri(), as defined byAgentRoute.pattern(), to its value. An empty result indicates thatnodeUricontains no dynamic components. -
getProp
swim.structure.Value getProp(swim.structure.Value key) Returns the value ofkeyinprops(). -
getProp
Returns the value ofnameinprops(). -
schedule
swim.concurrent.Schedule schedule()TheSchedulethat thisAgentContextis bound to. -
stage
swim.concurrent.Stage stage()The single-threaded executionStageon which thisAgentContextruns its application logic. -
asyncStage
swim.concurrent.Stage asyncStage()The multi-threaded executionStageon which thisAgentContextcan 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 theLanebelonging to theAgentmanaged by thisAgentContextthat is addressable bylaneUri, ornullif no suchLaneexists. -
openLane
RegisterslanewithlaneUriand returnslane. -
agents
swim.collections.FingerTrieSeq<Agent> agents() -
getAgent
-
getAgent
-
getAgent
-
openAgent
<A extends Agent> A openAgent(swim.structure.Value id, swim.structure.Value props, AgentFactory<A> agentFactory) -
openAgent
-
openAgent
-
openAgent
-
openAgent
-
openAgent
-
closeAgent
void closeAgent(swim.structure.Value id) -
closeAgent
-