- java.lang.Object
-
- swim.runtime.AbstractSwimRef
-
- swim.runtime.AbstractTierBinding
-
- swim.runtime.agent.AgentNode
-
- swim.runtime.agent.AgentModel
-
- All Implemented Interfaces:
Executor,swim.api.data.DataFactory,swim.api.downlink.DownlinkFactory,swim.api.lane.LaneFactory,swim.api.ref.SwimRef,swim.concurrent.Schedule,swim.concurrent.Stage,swim.concurrent.Task,swim.concurrent.TaskFunction,CellBinding,CellContext,NodeBinding,TierBinding,swim.store.StoreBinding,swim.store.StoreContext,swim.util.Log
public class AgentModel extends AgentNode
-
-
Field Summary
Fields Modifier and Type Field Description protected swim.api.agent.AgentType<?>agentTypeprotected swim.structure.Valueprops-
Fields inherited from class swim.runtime.agent.AgentNode
nodeContext, taskContext
-
Fields inherited from class swim.runtime.AbstractTierBinding
CLOSED_PHASE, CLOSED_STATE, CLOSING_STATE, FAILED_STATE, FAILING_STATE, LOADED_PHASE, LOADED_STATE, LOADING_STATE, OPENED_PHASE, OPENED_STATE, OPENING_STATE, PHASE_MASK, PHASE_SHIFT, RECOVERING_STATE, STARTED_PHASE, STARTED_STATE, STARTING_STATE, STATE_MASK, status, STATUS, STOPPING_STATE, UNLOADING_STATE
-
-
Constructor Summary
Constructors Constructor Description AgentModel(swim.api.agent.AgentType<?> agentType, swim.structure.Value props)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AgentViewaddAgentView(AgentView view)<S extends swim.api.agent.Agent>
SaddTrait(swim.structure.Value props, swim.api.agent.AgentFactory<S> agentFactory)swim.structure.ValueagentKey()swim.api.agent.AgentType<?>agentType()protected voiddidAddAgentView(AgentView view)voiddidClose()voiddidFail(Throwable error)protected voiddidLoad()protected voiddidOpen()protected voiddidRemoveAgentView(AgentView view)protected voiddidStart()protected voiddidStop()protected voiddidUnload()AgentViewgetAgentView(swim.structure.Value props)<S extends swim.api.agent.Agent>
SgetTrait(Class<S> agentClass)AgentViewmaterializeAgent(swim.api.agent.AgentFactory<?> agentFactory, swim.structure.Value props)swim.structure.Valueprops()voidpushUp(PushRequest pushRequest)voidremoveAgentView(AgentView view)voidsetNodeContext(NodeContext nodeContext)<T> TunwrapNode(Class<T> nodeClass)voidwillClose()protected voidwillLoad()protected voidwillOpen()protected voidwillStart()protected voidwillStop()protected voidwillUnload()-
Methods inherited from class swim.runtime.agent.AgentNode
bindDownlink, call, closeData, closeDownlink, closeLane, commandLane, createLaneContext, data, dataBindings, debug, demandLane, demandMapLane, error, execute, geospatialData, geospatialData, geospatialLane, getLane, getLanes, hostUri, httpDownlink, httpUplink, info, injectListData, injectMapData, injectSpatialData, injectValueData, joinMapLane, joinValueLane, listData, listData, listLane, mapData, mapData, mapLane, meshUri, nodeContext, nodeUri, normalizeLaneUri, openData, openDownlink, openLane, openLane, openLaneView, openListData, openMapData, openSpatialData, openUplink, openValueData, partKey, policy, pushDown, runTask, schedule, setTaskContext, setTimer, spatialData, spatialData, spatialLane, stage, supplyLane, task, taskContext, taskDidCancel, taskWillBlock, taskWillCue, tierContext, timer, trace, valueData, valueData, valueLane, warn
-
Methods inherited from class swim.runtime.AbstractTierBinding
activate, close, isClosed, isLoaded, isOpened, isStarted, load, open, start, stop, unload
-
Methods inherited from class swim.runtime.AbstractSwimRef
command, command, command, command, command, command, command, command, downlink, downlinkHttp, downlinkList, downlinkMap, downlinkValue, hostRef, hostRef, laneRef, laneRef, laneRef, laneRef, nodeRef, nodeRef, nodeRef, nodeRef
-
-
-
-
Method Detail
-
setNodeContext
public void setNodeContext(NodeContext nodeContext)
- Specified by:
setNodeContextin interfaceNodeBinding- Overrides:
setNodeContextin classAgentNode
-
unwrapNode
public <T> T unwrapNode(Class<T> nodeClass)
- Specified by:
unwrapNodein interfaceNodeBinding- Overrides:
unwrapNodein classAgentNode
-
agentKey
public swim.structure.Value agentKey()
- Specified by:
agentKeyin interfaceNodeBinding- Overrides:
agentKeyin classAgentNode
-
props
public swim.structure.Value props()
-
agentType
public swim.api.agent.AgentType<?> agentType()
-
materializeAgent
public AgentView materializeAgent(swim.api.agent.AgentFactory<?> agentFactory, swim.structure.Value props)
-
getAgentView
public AgentView getAgentView(swim.structure.Value props)
-
getTrait
public <S extends swim.api.agent.Agent> S getTrait(Class<S> agentClass)
-
addTrait
public <S extends swim.api.agent.Agent> S addTrait(swim.structure.Value props, swim.api.agent.AgentFactory<S> agentFactory)
-
removeAgentView
public void removeAgentView(AgentView view)
-
pushUp
public void pushUp(PushRequest pushRequest)
- Specified by:
pushUpin interfaceCellBinding- Overrides:
pushUpin classAgentNode
-
didAddAgentView
protected void didAddAgentView(AgentView view)
-
didRemoveAgentView
protected void didRemoveAgentView(AgentView view)
-
didOpen
protected void didOpen()
- Overrides:
didOpenin classAbstractTierBinding
-
didLoad
protected void didLoad()
- Overrides:
didLoadin classAbstractTierBinding
-
didStart
protected void didStart()
- Overrides:
didStartin classAbstractTierBinding
-
didStop
protected void didStop()
- Overrides:
didStopin classAbstractTierBinding
-
willUnload
protected void willUnload()
- Overrides:
willUnloadin classAgentNode
-
didUnload
protected void didUnload()
- Overrides:
didUnloadin classAbstractTierBinding
-
didClose
public void didClose()
- Specified by:
didClosein interfaceTierBinding- Overrides:
didClosein classAgentNode
-
didFail
public void didFail(Throwable error)
- Specified by:
didFailin interfaceTierBinding- Overrides:
didFailin classAgentNode
-
-