Package jason.infra.jade
Class JasonBridgeArch
java.lang.Object
jason.architecture.AgArch
jason.infra.jade.JasonBridgeArch
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<AgArch>
public class JasonBridgeArch extends AgArch
- See Also:
- Serialized Form
-
Field Summary
Fields Modifier and Type Field Description private boolean
consultEnv
(package private) jade.core.AID
environmentAID
(package private) JadeAgArch
jadeAg
(package private) java.util.logging.Logger
logger
private java.util.Map<java.lang.String,ActionExec>
myPA
-
Constructor Summary
Constructors Constructor Description JasonBridgeArch(JadeAgArch jadeAg)
-
Method Summary
Modifier and Type Method Description void
act(ActionExec action)
Executes the action action and, when finished, adds it back in feedback actions.void
broadcast(Message m)
Broadcasts a Jason messageboolean
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 circumstanceprivate java.lang.String
cutString(java.lang.String s, java.lang.String c)
java.lang.String
getAgName()
Gets the agent's nameprivate jade.core.AID
getEnvironmentAg()
JadeAgArch
getJadeAg()
RuntimeServices
getRuntimeServices()
void
init(AgentParameters ap)
(package private) boolean
isActionFeedback(jade.lang.acl.ACLMessage m)
java.util.Collection<Literal>
perceive()
Gets the agent's perception as a list of Literals.void
sendMsg(Message m)
Sends a Jason messagevoid
stop()
A call-back method called by the infrastructure tier when the agent is about to be killed.protected java.lang.Object
translateContentToJason(jade.lang.acl.ACLMessage m)
returns the content of the message m and implements some pro-processing of the content, if necessaryprotected Literal
translateDFSubscribeToJason(jade.lang.acl.ACLMessage m)
void
wake()
Puts the agent in sleep.Methods inherited from class jason.architecture.AgArch
actionExecuted, compareTo, createCustomArchs, equals, getAgArchClassesChain, getCycleNumber, getFirstAgArch, getNextAgArch, getStatus, getTS, hashCode, incCycleNumber, init, insertAgArch, isRunning, reasoningCycleFinished, reasoningCycleStarting, setCycleNumber, setTS, toString, wakeUpAct, wakeUpDeliberate, wakeUpSense
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Field Details
-
jadeAg
JadeAgArch jadeAg -
environmentAID
jade.core.AID environmentAID -
logger
java.util.logging.Logger logger -
myPA
-
consultEnv
private boolean consultEnv
-
-
Constructor Details
-
JasonBridgeArch
-
-
Method Details
-
init
- Throws:
java.lang.Exception
-
wake
public void wake()Description copied from class:AgArch
Puts the agent in sleep. -
stop
public void stop()Description copied from class:AgArch
A call-back method called by the infrastructure tier when the agent is about to be killed. -
getAgName
public java.lang.String getAgName()Description copied from class:AgArch
Gets the agent's name -
canSleep
public boolean canSleep()Description copied from class:AgArch
Returns true if the agent can enter in sleep mode. -
perceive
Description copied from class:AgArch
Gets the agent's perception as a list of Literals. The returned list will be modified by Jason. -
getJadeAg
-
sendMsg
Description copied from class:AgArch
Sends a Jason message -
broadcast
Description copied from class:AgArch
Broadcasts a Jason message -
checkMail
public void checkMail()Description copied from class:AgArch
Reads the agent's mailbox and adds messages into the agent's circumstance -
translateContentToJason
protected java.lang.Object translateContentToJason(jade.lang.acl.ACLMessage m)returns the content of the message m and implements some pro-processing of the content, if necessary -
translateDFSubscribeToJason
-
cutString
private java.lang.String cutString(java.lang.String s, java.lang.String c) -
act
Description copied from class:AgArch
Executes the action action and, when finished, adds it back in feedback actions. -
getRuntimeServices
- Overrides:
getRuntimeServices
in classAgArch
-
getEnvironmentAg
private jade.core.AID getEnvironmentAg() -
isActionFeedback
boolean isActionFeedback(jade.lang.acl.ACLMessage m)
-