aminePlatform.agent.amineJade
Class AmineJadeAgent

java.lang.Object
  extended byjade.core.Agent
      extended byaminePlatform.agent.amineJade.AmineJadeAgent
All Implemented Interfaces:
AmineAgent, java.lang.Runnable, java.io.Serializable, jade.util.leap.Serializable, jade.core.TimerListener
Direct Known Subclasses:
PPCGAmineJadeAgent

public class AmineJadeAgent
extends jade.core.Agent
implements AmineAgent

Title : AmineJadeAgent class

Description : AmineJadeAgent is the class that corresponds to an agent that can benefit from both Amine and Jade platforms. As introduced in the MAS classes, to create an MAS, it is necessary to declare one or more agents that would constitute the MAS. AgentJadeAgent is one possible class to use to create an agent on your system. This type of agent is not benefiting from the Prolog engine. If you want to do so, use instead PPCGAmineJadeAgent class

Copyright : Copyright (c) Adil KABBAJ 2004-2009

See Also:
Serialized Form

Field Summary
 java.lang.String agentID
          Every agent has a specific ID
 BasicAmineAgentGuiFrame myGui
          Every agent has a specific window that displays information about that agent
 
Fields inherited from class jade.core.Agent
AP_ACTIVE, AP_COPY, AP_DELETED, AP_IDLE, AP_INITIATED, AP_MAX, AP_MIN, AP_SUSPENDED, AP_TRANSIT, AP_WAITING, currentBehaviour, currentMessage, D_ACTIVE, D_MAX, D_MIN, D_RETIRED, D_SUSPENDED, D_UNKNOWN
 
Constructor Summary
AmineJadeAgent()
           
 
Method Summary
 void listen()
          it allows the current agent to listen to its mailBox to check if it has received any message.
 void satisfyGoal(java.lang.String goal)
          One of the main goals for using MAS is that agents have to act autonomously by satisfying their own goal.
 void send(AmineAgent receiver, java.lang.String content)
          it allows the current agent to send a message content to a receiver agent.
 void send(java.lang.String receiver, java.lang.String content)
          it allows the current agent to send a message content to a receiver agent.
 java.lang.Object sendAndWait(AmineAgent receiver, java.lang.String content)
          it allows the current agent to send a message content to a receiver agent and wait for the response.
 java.lang.Object sendAndWait(java.lang.String receiver, java.lang.String content)
          it allows the current agent to send a message content to a receiver agent and wait for the response.
 void setup()
          This method is overwritten from the Jade platform.
 
Methods inherited from class jade.core.Agent
addBehaviour, afterClone, afterMove, beforeClone, beforeMove, blockingReceive, blockingReceive, blockingReceive, blockingReceive, doActivate, doClone, doDelete, doMove, doStart, doSuspend, doTimeOut, doWait, doWait, doWake, extractPassword, extractUsername, getAgentState, getAID, getAMS, getArguments, getAuthority, getCertificateFolder, getContainerController, getContentManager, getCurQueueSize, getDefaultDF, getHap, getHelper, getLocalName, getName, getO2AObject, getPrincipal, getProperty, getQueueSize, getState, here, notifyChangeBehaviourState, notifyRestarted, postMessage, putBack, putO2AObject, read, read, receive, receive, removeBehaviour, restartLater, restore, run, send, setArguments, setEnabledO2ACommunication, setGenerateBehaviourEvents, setOwnership, setPrincipal, setQueueSize, takeDown, waitUntilStarted, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

agentID

public java.lang.String agentID
Every agent has a specific ID


myGui

public BasicAmineAgentGuiFrame myGui
Every agent has a specific window that displays information about that agent

Constructor Detail

AmineJadeAgent

public AmineJadeAgent()
Method Detail

setup

public void setup()
This method is overwritten from the Jade platform. It allows to setup the creation of one agent within the MAS and do the corresponding updating concerning the whole MAS such as incrementing the number of created agents, etc.

Specified by:
setup in interface AmineAgent

satisfyGoal

public void satisfyGoal(java.lang.String goal)
One of the main goals for using MAS is that agents have to act autonomously by satisfying their own goal. For the type of an AmineJadeAgent, nothing is predefined since it is up to the programmer to use the inference engine of his(er) choice (or to program how an agent might satisfy a goal).

Specified by:
satisfyGoal in interface AmineAgent
Parameters:
goal - A String

send

public void send(AmineAgent receiver,
                 java.lang.String content)
it allows the current agent to send a message content to a receiver agent.

Specified by:
send in interface AmineAgent
Parameters:
receiver - An AmineJadeAgent
content - a String corresponding to the message

send

public void send(java.lang.String receiver,
                 java.lang.String content)
it allows the current agent to send a message content to a receiver agent.

Specified by:
send in interface AmineAgent
Parameters:
receiver - a String corresponding to the (System) local name of the agent
content - a String corresponding to the message

sendAndWait

public java.lang.Object sendAndWait(AmineAgent receiver,
                                    java.lang.String content)
it allows the current agent to send a message content to a receiver agent and wait for the response.

Specified by:
sendAndWait in interface AmineAgent
Parameters:
receiver - An AmineJadeAgent
content - a String corresponding to the message

sendAndWait

public java.lang.Object sendAndWait(java.lang.String receiver,
                                    java.lang.String content)
it allows the current agent to send a message content to a receiver agent and wait for the response.

Specified by:
sendAndWait in interface AmineAgent
Parameters:
receiver - a String corresponding to the (System) local name of the agent
content - a String corresponding to the message

listen

public void listen()
it allows the current agent to listen to its mailBox to check if it has received any message.

Specified by:
listen in interface AmineAgent