public interface AgentEngineContext
AgentEngine
implemented in
another package to invoke operations that cannot be accessed
outside of the fr.dyade.aaa.agent
package.
An AgentEngineContext
should be for the unique private use of its associated
AgentEngine
and should not be shared with any other components otherwise
the agent server security would be broken.Modifier and Type | Method and Description |
---|---|
void |
channelPost(Message msg)
Posts a message in the channel.
|
void |
checkMessageFrom(Message msg)
Checks the message 'from'.
|
Agent |
createAgentFactory()
Creates an instance of
AgentFactory . |
Message |
createMessage(AgentId from,
AgentId to,
Notification not)
Creates a message.
|
void |
deleteMessage(Message msg)
Deletes and frees the specified message.
|
void |
directSendTo(AgentId to,
Notification not)
Sends a notification to the specified destination
with a local id.
|
MessageConsumer |
getConsumer(short id)
Returns the specified
MessageConsumer |
AgentId |
getLocalAgentId()
Returns the local agent id.
|
void |
incReactNumber(Agent ag)
Increments the reaction counter of
the specified agent.
|
void |
initAgentLogger(Agent agent)
Initializes the agent's logger.
|
void |
initializeAgent(AgentId id,
Agent agent)
Initializes an agent after creation.
|
void |
initializeReloadedAgent(Agent agent)
Initializes a reloaded agent.
|
Agent |
loadAgent(AgentId id)
Loads the specified agent.
|
void |
saveAgent(Agent agent)
Saves the agent
|
void |
saveChannel()
Saves the channel
|
void |
setAgentLast(Agent ag,
long last)
Sets the agent last reaction count.
|
void |
setSaveAgent(Agent agent)
Sets the agent as to be saved.
|
void |
stampAndSave(Message msg,
int stamp)
Stamps and saves the specified message.
|
void |
validateChannel()
Validates the Channel.
|
Agent createAgentFactory() throws IOException
AgentFactory
.AgentFactory
IOException
void initializeAgent(AgentId id, Agent agent) throws Exception
id
- the identifier of the agent to initializeagent
- the agent to initializeException
void directSendTo(AgentId to, Notification not)
to
- the notification destinationnot
- the notification to sendvoid initAgentLogger(Agent agent) throws Exception
agent
- the agent to initializeException
Agent loadAgent(AgentId id) throws IOException, ClassNotFoundException
id
- the identifier of the agent to loadIOException
ClassNotFoundException
void setAgentLast(Agent ag, long last)
ag
- the agent to modifylast
- the reaction count to setvoid initializeReloadedAgent(Agent agent) throws Exception
agent
- Exception
void setSaveAgent(Agent agent)
agent
- the agent to updatevoid saveAgent(Agent agent) throws IOException
agent
- the agent to saveIOException
Message createMessage(AgentId from, AgentId to, Notification not)
from
- the source of the messageto
- the destination of the messagenot
- the notification to be transmitted by the messagevoid deleteMessage(Message msg)
msg
- AgentId getLocalAgentId()
void incReactNumber(Agent ag)
ag
- the agent to updatevoid validateChannel()
void checkMessageFrom(Message msg)
msg
- the message to checkMessageConsumer getConsumer(short id) throws UnknownServerException
MessageConsumer
id
- the identifier of the MessageConsumer
MessageConsumer
UnknownServerException
void channelPost(Message msg) throws Exception
msg
- the message to postException
void saveChannel() throws IOException
IOException
void stampAndSave(Message msg, int stamp) throws IOException
msg
- the message to stamp and savestamp
- the stamp to assignIOException
Copyright © 2020 ScalAgent D.T.. All rights reserved.