- java.lang.Object
-
- swim.runtime.AbstractSwimRef
-
- swim.runtime.AbstractTierBinding
-
- swim.agent.AgentNode
-
- swim.agent.AgentModel
-
- All Implemented Interfaces:
Executor
,DownlinkFactory
,LaneFactory
,SwimRef
,Schedule
,Stage
,Task
,TaskFunction
,CellBinding
,CellContext
,NodeBinding
,TierBinding
,Log
public class AgentModel extends AgentNode
-
-
Field Summary
Fields Modifier and Type Field Description protected Value
props
-
Fields inherited from class swim.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(Value props)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AgentView
addAgentView(AgentView view)
<S extends Agent>
SaddTrait(Value props, AgentFactory<S> agentFactory)
AgentView
createAgent(AgentFactory<?> agentFactory, Value props)
protected void
didAddAgentView(AgentView view)
void
didClose()
void
didFail(Throwable error)
protected void
didLoad()
protected void
didOpen()
protected void
didRemoveAgentView(AgentView view)
protected void
didStart()
protected void
didStop()
protected void
didUnload()
AgentView
getAgentView(Value props)
<S extends Agent>
SgetTrait(Class<S> agentClass)
Value
props()
void
pushUp(PushRequest pushRequest)
void
removeAgentView(AgentView view)
void
setNodeContext(NodeContext nodeContext)
void
willClose()
protected void
willLoad()
protected void
willOpen()
protected void
willStart()
protected void
willStop()
protected void
willUnload()
-
Methods inherited from class swim.agent.AgentNode
bindDownlink, call, closeDownlink, closeLane, commandLane, createAgentFactory, createAgentFactory, createdTime, createLaneContext, debug, demandLane, demandMapLane, error, execute, geospatialLane, getLane, host, hostUri, httpDownlink, httpUplink, info, joinMapLane, joinValueLane, lanes, listLane, mapLane, meshUri, nodeContext, nodeUri, nodeWrapper, normalizezLaneUri, openAgents, openDownlink, openLane, openLane, openLane, openLanes, openLaneView, openUplink, partKey, policy, pushDown, runTask, schedule, setTaskContext, setTimer, spatialLane, stage, store, supplyLane, task, taskContext, taskDidCancel, taskWillBlock, taskWillCue, tierContext, timer, trace, unwrapNode, valueLane, warn, wsLane
-
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, downlinkWs, hostRef, hostRef, laneRef, laneRef, laneRef, laneRef, nodeRef, nodeRef, nodeRef, nodeRef
-
-
-
-
Field Detail
-
props
protected final Value props
-
-
Constructor Detail
-
AgentModel
public AgentModel(Value props)
-
-
Method Detail
-
setNodeContext
public void setNodeContext(NodeContext nodeContext)
- Specified by:
setNodeContext
in interfaceNodeBinding
- Overrides:
setNodeContext
in classAgentNode
-
props
public Value props()
-
createAgent
public AgentView createAgent(AgentFactory<?> agentFactory, Value props)
-
addTrait
public <S extends Agent> S addTrait(Value props, AgentFactory<S> agentFactory)
-
removeAgentView
public void removeAgentView(AgentView view)
-
pushUp
public void pushUp(PushRequest pushRequest)
- Specified by:
pushUp
in interfaceCellBinding
- Overrides:
pushUp
in classAgentNode
-
didAddAgentView
protected void didAddAgentView(AgentView view)
-
didRemoveAgentView
protected void didRemoveAgentView(AgentView view)
-
didOpen
protected void didOpen()
- Overrides:
didOpen
in classAbstractTierBinding
-
didLoad
protected void didLoad()
- Overrides:
didLoad
in classAbstractTierBinding
-
didStart
protected void didStart()
- Overrides:
didStart
in classAbstractTierBinding
-
didStop
protected void didStop()
- Overrides:
didStop
in classAbstractTierBinding
-
willUnload
protected void willUnload()
- Overrides:
willUnload
in classAgentNode
-
didUnload
protected void didUnload()
- Overrides:
didUnload
in classAbstractTierBinding
-
didClose
public void didClose()
- Specified by:
didClose
in interfaceTierBinding
- Overrides:
didClose
in classAgentNode
-
didFail
public void didFail(Throwable error)
- Specified by:
didFail
in interfaceTierBinding
- Overrides:
didFail
in classAgentNode
-
-