|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jason.architecture.AgArch jason.infra.centralised.CentralisedAgArch
public class CentralisedAgArch
This class provides an agent architecture when using Centralised infrastructure to run the MAS inside Jason.
Execution sequence:
Field Summary | |
---|---|
protected CentralisedEnvironment |
infraEnv
|
protected java.util.logging.Logger |
logger
|
Constructor Summary | |
---|---|
CentralisedAgArch()
|
Method Summary | |
---|---|
void |
act(ActionExec action,
java.util.List<ActionExec> feedback)
called by the TS to ask the execution of an action in the environment |
void |
actionExecuted(ActionExec action)
called the the environment when the action was executed |
static void |
addMsgListener(MsgListener l)
|
void |
broadcast(Message m)
Broadcasts a Jason message |
boolean |
canSleep()
Returns true if the agent can enter in sleep mode. |
void |
checkMail()
Reads the agent's mailbox and adds messages into the agent's circumstance |
void |
createArchs(java.util.List<java.lang.String> agArchClasses,
Agent ag,
RunCentralisedMAS masRunner)
init the agent architecture based on another agent |
void |
createArchs(java.util.List<java.lang.String> agArchClasses,
java.lang.String agClass,
ClassParameters bbPars,
java.lang.String asSrc,
Settings stts,
RunCentralisedMAS masRunner)
Creates the user agent architecture, default architecture is jason.architecture.AgArch. |
java.lang.String |
getAgName()
Gets the agent's name |
CentralisedExecutionControl |
getControlInfraTier()
|
CentralisedEnvironment |
getEnvInfraTier()
|
java.util.logging.Logger |
getLogger()
|
RuntimeServicesInfraTier |
getRuntimeServices()
Gets an object with infrastructure runtime services |
AgArch |
getUserAgArch()
|
void |
informCycleFinished(boolean breakpoint,
int cycle)
Informs the infrastructure tier controller that the agent has finished its reasoning cycle (used in sync mode). |
boolean |
isRunning()
Checks whether the agent is running |
java.util.List<Literal> |
perceive()
Gets the agent's perception as a list of Literals. |
void |
receiveMsg(Message m)
|
void |
receiveSyncSignal()
inform this agent that it can continue, if it is in sync mode and waiting a signal |
static void |
removeMsgListener(MsgListener l)
|
void |
run()
|
void |
sendMsg(Message m)
Sends a Jason message |
void |
setAgName(java.lang.String name)
|
void |
setControlInfraTier(CentralisedExecutionControl pControl)
|
void |
setEnvInfraTier(CentralisedEnvironment env)
|
void |
setLogger()
|
void |
setThread(java.lang.Thread t)
|
void |
sleep()
Puts the agent in sleep. |
void |
stopAg()
|
void |
wake()
Removes the agent from the "sleep" mode |
Methods inherited from class jason.architecture.AgArch |
---|
createCustomArchs, getAgArchClassesChain, getArchInfraTier, getCycleNumber, getFirstAgArch, getNextAgArch, getTS, incCycleNumber, init, initAg, insertAgArch, reasoningCycleStarting, setCycleNumber, setTS, stop |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected CentralisedEnvironment infraEnv
protected java.util.logging.Logger logger
Constructor Detail |
---|
public CentralisedAgArch()
Method Detail |
---|
public static void addMsgListener(MsgListener l)
public static void removeMsgListener(MsgListener l)
public void createArchs(java.util.List<java.lang.String> agArchClasses, java.lang.String agClass, ClassParameters bbPars, java.lang.String asSrc, Settings stts, RunCentralisedMAS masRunner) throws JasonException
JasonException
public void createArchs(java.util.List<java.lang.String> agArchClasses, Agent ag, RunCentralisedMAS masRunner) throws JasonException
JasonException
public void stopAg()
public void setLogger()
public java.util.logging.Logger getLogger()
public void setAgName(java.lang.String name)
public java.lang.String getAgName()
AgArch
getAgName
in interface AgArchInfraTier
getAgName
in class AgArch
public AgArch getUserAgArch()
public void setEnvInfraTier(CentralisedEnvironment env)
public CentralisedEnvironment getEnvInfraTier()
public void setControlInfraTier(CentralisedExecutionControl pControl)
public CentralisedExecutionControl getControlInfraTier()
public void setThread(java.lang.Thread t)
public boolean isRunning()
AgArch
isRunning
in interface AgArchInfraTier
isRunning
in class AgArch
public void run()
run
in interface java.lang.Runnable
public void sleep()
AgArch
sleep
in interface AgArchInfraTier
sleep
in class AgArch
public void wake()
AgArchInfraTier
wake
in interface AgArchInfraTier
wake
in class AgArch
public java.util.List<Literal> perceive()
AgArch
perceive
in interface AgArchInfraTier
perceive
in class AgArch
public void sendMsg(Message m) throws ReceiverNotFoundException
AgArch
sendMsg
in interface AgArchInfraTier
sendMsg
in class AgArch
ReceiverNotFoundException
public void receiveMsg(Message m)
public void broadcast(Message m) throws java.lang.Exception
AgArch
broadcast
in interface AgArchInfraTier
broadcast
in class AgArch
java.lang.Exception
public void checkMail()
AgArch
checkMail
in interface AgArchInfraTier
checkMail
in class AgArch
public void act(ActionExec action, java.util.List<ActionExec> feedback)
act
in interface AgArchInfraTier
act
in class AgArch
public void actionExecuted(ActionExec action)
public boolean canSleep()
AgArch
canSleep
in interface AgArchInfraTier
canSleep
in class AgArch
public void receiveSyncSignal()
public void informCycleFinished(boolean breakpoint, int cycle)
breakpoint is true in case the agent selected one plan with the "breakpoint" annotation.
public RuntimeServicesInfraTier getRuntimeServices()
AgArchInfraTier
getRuntimeServices
in interface AgArchInfraTier
getRuntimeServices
in class AgArch
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |