Class JadeAg

java.lang.Object
jade.core.Agent
jason.infra.jade.JadeAg
All Implemented Interfaces:
jade.core.TimerListener, jade.util.leap.Serializable, java.io.Serializable, java.lang.Runnable
Direct Known Subclasses:
JadeAgArch, JadeEnvironment, JadeExecutionControl

public abstract class JadeAg
extends jade.core.Agent
Implementation of a basic jade agent for jason agents
Author:
Jomi
See Also:
Serialized Form
  • Nested Class Summary

    Nested classes/interfaces inherited from class jade.core.Agent

    jade.core.Agent.Interrupted
  • Field Summary

    Fields
    Modifier and Type Field Description
    static int ASKALL  
    static int ASKHOW  
    protected java.util.Map<java.lang.String,​java.lang.String> conversationIds  
    protected java.util.logging.Logger logger  
    protected boolean running  
    private static int rwid  
    private static long serialVersionUID  
    static int TELLHOW  
    static int UNACHIEVE  
    static int UNTELL  
    static int UNTELLHOW  

    Fields inherited from class jade.core.Agent

    AP_ACTIVE, AP_DELETED, AP_IDLE, AP_INITIATED, AP_MAX, AP_MIN, AP_SUSPENDED, AP_WAITING, D_ACTIVE, D_MAX, D_MIN, D_RETIRED, D_SUSPENDED, D_UNKNOWN, MSG_QUEUE_CLASS
  • Constructor Summary

    Constructors
    Constructor Description
    JadeAg()  
  • Method Summary

    Modifier and Type Method Description
    static java.lang.String aclPerformativeToKqml​(jade.lang.acl.ACLMessage m)  
    void addAllAgsAsReceivers​(jade.lang.acl.ACLMessage m)  
    protected jade.lang.acl.ACLMessage ask​(jade.lang.acl.ACLMessage m)  
    void broadcast​(Message m)  
    void doDelete()  
    int incReplyWithId()  
    boolean isRunning()  
    protected jade.lang.acl.ACLMessage jasonToACL​(Message m)  
    static jade.lang.acl.ACLMessage kqmlToACL​(java.lang.String p)  
    void putConversationId​(java.lang.String replyWith, java.lang.String mId)  
    void sendMsg​(Message m)  

    Methods inherited from class jade.core.Agent

    addBehaviour, afterClone, afterMove, beforeClone, beforeMove, blockingReceive, blockingReceive, blockingReceive, blockingReceive, changeStateTo, clean, createMessageQueue, doActivate, doClone, doMove, doSuspend, doTimeOut, doWait, doWait, doWake, getAgentState, getAID, getAID, getAMS, getArguments, getBootProperties, getContainerController, getContentManager, getCurQueueSize, getDefaultDF, getHap, getHelper, getLocalName, getName, getO2AInterface, getO2AObject, getProperty, getQueueSize, getState, here, isRestarting, join, notifyChangeBehaviourState, notifyRestarted, postMessage, putBack, putO2AObject, receive, receive, registerO2AInterface, removeBehaviour, removeTimer, restartLater, restore, restoreBufferedState, run, send, setArguments, setEnabledO2ACommunication, setGenerateBehaviourEvents, setO2AManager, setQueueSize, setup, takeDown, waitUntilStarted, write

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • UNTELL

      public static final int UNTELL
      See Also:
      Constant Field Values
    • ASKALL

      public static final int ASKALL
      See Also:
      Constant Field Values
    • UNACHIEVE

      public static final int UNACHIEVE
      See Also:
      Constant Field Values
    • TELLHOW

      public static final int TELLHOW
      See Also:
      Constant Field Values
    • UNTELLHOW

      public static final int UNTELLHOW
      See Also:
      Constant Field Values
    • ASKHOW

      public static final int ASKHOW
      See Also:
      Constant Field Values
    • serialVersionUID

      private static final long serialVersionUID
      See Also:
      Constant Field Values
    • logger

      protected java.util.logging.Logger logger
    • rwid

      private static int rwid
    • running

      protected boolean running
    • conversationIds

      protected java.util.Map<java.lang.String,​java.lang.String> conversationIds
  • Constructor Details

    • JadeAg

      public JadeAg()
  • Method Details

    • doDelete

      public void doDelete()
      Overrides:
      doDelete in class jade.core.Agent
    • isRunning

      public boolean isRunning()
    • incReplyWithId

      public int incReplyWithId()
    • sendMsg

      public void sendMsg​(Message m) throws java.lang.Exception
      Throws:
      java.lang.Exception
    • broadcast

      public void broadcast​(Message m)
    • putConversationId

      public void putConversationId​(java.lang.String replyWith, java.lang.String mId)
    • ask

      protected jade.lang.acl.ACLMessage ask​(jade.lang.acl.ACLMessage m)
    • addAllAgsAsReceivers

      public void addAllAgsAsReceivers​(jade.lang.acl.ACLMessage m) throws java.lang.Exception
      Throws:
      java.lang.Exception
    • jasonToACL

      protected jade.lang.acl.ACLMessage jasonToACL​(Message m) throws java.io.IOException
      Throws:
      java.io.IOException
    • kqmlToACL

      public static jade.lang.acl.ACLMessage kqmlToACL​(java.lang.String p)
    • aclPerformativeToKqml

      public static java.lang.String aclPerformativeToKqml​(jade.lang.acl.ACLMessage m)