jadex.micro.examples.ping
Class PingingAgent

java.lang.Object
  extended by jadex.micro.MicroAgent
      extended by jadex.micro.examples.ping.PingingAgent
All Implemented Interfaces:
IInternalAccess, IMicroAgent

public class PingingAgent
extends MicroAgent

Agent that pings another and waits for its replies.


Nested Class Summary
 
Nested classes/interfaces inherited from class jadex.micro.MicroAgent
MicroAgent.TimerWrapper
 
Field Summary
protected  int dif
          The difference between sent messages and received replies.
protected  IComponentIdentifier receiver
          The receiver.
protected  Set sent
          Hashset with conversation ids of sent messages.
 
Fields inherited from class jadex.micro.MicroAgent
interpreter, longtime, timers
 
Constructor Summary
PingingAgent()
           
 
Method Summary
 void executeBody()
          Execute the body.
static Object getMetaInfo()
          Get the agent meta info.
 void messageArrived(Map msg, MessageType mt)
          Called when a message arrives.
 
Methods inherited from class jadex.micro.MicroAgent
addComponentListener, addDirectService, addService, agentCreated, agentKilled, createComponentIdentifier, createComponentIdentifier, createComponentIdentifier, createReply, createResultListener, createServiceContainer, getAgentAdapter, getAgentName, getArgument, getArguments, getChildren, getComponentIdentifier, getConfiguration, getExternalAccess, getLogger, getModel, getParent, getServiceProvider, getTime, init, isAtBreakpoint, killAgent, killComponent, removeComponentListener, removeService, scheduleStep, sendMessage, setResultValue, waitFor, waitForTick
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

receiver

protected IComponentIdentifier receiver
The receiver.


dif

protected int dif
The difference between sent messages and received replies.


sent

protected Set sent
Hashset with conversation ids of sent messages.

Constructor Detail

PingingAgent

public PingingAgent()
Method Detail

executeBody

public void executeBody()
Execute the body.

Specified by:
executeBody in interface IMicroAgent
Overrides:
executeBody in class MicroAgent

messageArrived

public void messageArrived(Map msg,
                           MessageType mt)
Called when a message arrives.

Specified by:
messageArrived in interface IMicroAgent
Overrides:
messageArrived in class MicroAgent

getMetaInfo

public static Object getMetaInfo()
Get the agent meta info.



Copyright © 2010. All Rights Reserved.