4

I am very new to Jade Agent concept. I have been searching around the internet about this question but there is very less material available on this topic. So I decided to ask a question here.

In java when we run any class by entering java classname in terminal, JVM by default calls that class' main() method. Same way the setup() method is called when we run the Agent class (Pardon me if I'm wrong). But the thing I am unable to understand is how does the setup() method is called and what calls it or how does the execution of an Agent is started.

Any insight regarding this question is highly appreciated.

Thanks.

Mike Causer
  • 7,676
  • 1
  • 41
  • 62
Dhrumil Patel
  • 764
  • 6
  • 17

2 Answers2

5

As a part of my initial research in the field, I have discovered the following answer from some reliable sources.

The setup method is used to perform agent initializations. The actual job the agent has to perform is typically carried out by behaviours.

The typical functions that an agent performs in it's setup() method is:

  1. Initializing the GUI
  2. Creating/opening a connection with the database
  3. Registering the service it provides in the Yellow Pages Catalogue
araknoid
  • 2,805
  • 4
  • 30
  • 32
Yash Shah
  • 66
  • 1
0

I am not familiar with jade agent, but the main() method of the main class, whatever it is called, is the starting point for the jvm. The main class must be managed by jade agent. After it is done doing what it needs to do it will call setup()

joe pelletier
  • 369
  • 2
  • 12