es.upm.dit.gsi.beast.mock.jade.bridgeMock
Class BridgeMockAgent

java.lang.Object
  extended by jade.core.Agent
      extended by es.upm.dit.gsi.beast.mock.jade.bridgeMock.BridgeMockAgent
All Implemented Interfaces:
jade.core.TimerListener, Serializable, Runnable

public class BridgeMockAgent
extends jade.core.Agent

Project: beast File: es.upm.dit.gsi.beast.mock.jade.bridgeMock.BridgeMockAgent.java Allows communication between agents. Grupo de Sistemas Inteligentes Departamento de Ingeniería de Sistemas Telemáticos Universidad Politécnica de Madrid (UPM)

Version:
0.1
Author:
Alberto Mardomingo
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class jade.core.Agent
jade.core.Agent.Interrupted
 
Field Summary
protected  jade.util.Logger logger
          Logger
 
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
BridgeMockAgent()
           
 
Method Summary
 int getIntegerBelief(String name)
          Returns the integer value o the given belief
 boolean isRegistered()
           
 void sendMessage(jade.core.AID agentAID, String content, int perf)
          Sends a message to the agent with the given AID
 void sendMessage(String agentName, String content, int perf)
          Sends a message to the agent with the given name
 void setRegistered(boolean registered)
           
 void setup()
          Initializes the Agent.
 void updateIntegerBelief(String name, int value)
          Updates the given integer belief adding the given integer newBelief = previousBelief + givenValue
 
Methods inherited from class jade.core.Agent
addBehaviour, afterClone, afterMove, beforeClone, beforeMove, blockingReceive, blockingReceive, blockingReceive, blockingReceive, changeStateTo, clean, createMessageQueue, doActivate, doClone, doDelete, doMove, doSuspend, doTimeOut, doWait, doWait, doWake, getAgentState, getAID, getAMS, getArguments, getBootProperties, getContainerController, getContentManager, getCurQueueSize, getDefaultDF, getHap, getHelper, getLocalName, getName, getO2AObject, getProperty, getQueueSize, getState, here, isRestarting, join, notifyChangeBehaviourState, notifyRestarted, postMessage, putBack, putO2AObject, receive, receive, removeBehaviour, removeTimer, restartLater, restore, restoreBufferedState, run, send, setArguments, setEnabledO2ACommunication, setGenerateBehaviourEvents, setO2AManager, setQueueSize, takeDown, waitUntilStarted, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected final jade.util.Logger logger
Logger

Constructor Detail

BridgeMockAgent

public BridgeMockAgent()
Method Detail

setup

public void setup()
Initializes the Agent.

Overrides:
setup in class jade.core.Agent
See Also:
Agent.setup()

isRegistered

public boolean isRegistered()

setRegistered

public void setRegistered(boolean registered)

sendMessage

public void sendMessage(String agentName,
                        String content,
                        int perf)
Sends a message to the agent with the given name

Parameters:
String - - The name of the destination
string - - The content of the message
int - -

sendMessage

public void sendMessage(jade.core.AID agentAID,
                        String content,
                        int perf)
Sends a message to the agent with the given AID

Parameters:
String - - The AID of the destination
string - - The content of the message
int - -

updateIntegerBelief

public void updateIntegerBelief(String name,
                                int value)
Updates the given integer belief adding the given integer newBelief = previousBelief + givenValue

Parameters:
String - - the belief name
the - value to add

getIntegerBelief

public int getIntegerBelief(String name)
Returns the integer value o the given belief



Copyright © 2014 Grupo de Sistemas Inteligentes - Universidad Politécnica de Madrid. All Rights Reserved.