final class AgentFactory extends Agent
Agent
used to allow remote agent creation. Every agent
server hosts a factory agent, they all use a predefined stamp identifier
AgentId.factoryId
. The factory must be able to create all
types of objects, actually it is supposed that the corresponding classes
can be reached.The agent creation process involves the following steps
Agent
object in memory ;
AgentCreateRequest
notification with the resulting string, sending it to the target
Factory agent ;
Modifier and Type | Field and Description |
---|---|
private static long |
serialVersionUID
define serialVersionUID for interoperability
|
agentProfiling, commitTime, deployed, emptyString, fixed, id, last, logmon, name, reactNb, reactTime
BOOLEAN_ENCODED_SIZE, BYTE_ENCODED_SIZE, DOUBLE_ENCODED_SIZE, FLOAT_ENCODED_SIZE, INT_ENCODED_SIZE, LONG_ENCODED_SIZE, SHORT_ENCODED_SIZE
Constructor and Description |
---|
AgentFactory(AgentId factoryId)
Allocates a new
AgentFactory agent. |
Modifier and Type | Method and Description |
---|---|
protected void |
agentInitialize(boolean firstTime)
Gives this agent an opportunity to initialize after having been
deployed, and each time it is loaded into memory.
|
protected String |
getLogTopic()
Returns log topic for factory agent.
|
void |
react(AgentId from,
Notification not)
Reacts to notifications ... .
|
agentFinalize, agentSave, decode, delete, delete, delete, deploy, deploy, encode, getAgentId, getCommitTime, getEncodableClassId, getEncodedSize, getId, getName, getReactNb, getReactTime, hasName, incWorkInProgress, isAgentProfiling, isDeployed, isFixed, isUpdated, load, needToBeCommited, resetCommitTime, resetReactTime, resetTimer, save, sendTo, sendTo, sendTo, setAgentProfiling, setName, setNoSave, setSave, toString
private static final long serialVersionUID
AgentFactory(AgentId factoryId)
AgentFactory
agent.
An AgentFactory
agent must be created on every agent
server the first time it runs.factoryId
- unique identifier for factory agent.protected String getLogTopic()
getLogTopic
in class Agent
protected void agentInitialize(boolean firstTime) throws Exception
fixed
field set to true
.agentInitialize
in class Agent
firstTime
- true when first called by the factoryException
- unspecialized exceptionCopyright © 2022 ScalAgent D.T.. All rights reserved.