JADETutorial Programming 240105 155442
JADETutorial Programming 240105 155442
import jade.core.Agent;
• The actual job that an agent does is typically carried out within
“behaviours”
• Behaviours are created by extending the
jade.core.behaviours.Behaviour class
• To make an agent execute a task it is sufficient to create an
instance of the corresponding Behaviour subclass and call the
addBehaviour() method of the Agent class.
• Each Behaviour subclass must implement
execution model
- Addition of initial
behaviours
NO
b.action()
Highlighted in red - Agent “life” (execution
the methods that of behaviours)
programmers have
to/can implement NO
YES
A1 A2
A1: - serviceX
A1 - serviceY A4
A2: - serviceZ
Publish
Search for
provided
A3: - serviceW agents
services - serviceK providing the
- serviceH
A2 required
services A5
Yellow Pages service
A3 Exploit required A6
service
Information
Information
represented as a string or a JADE
represented as Java objects
sequence of bytes support for
(EASY TO HANDLE)
(EASY TO TRANSFER) handling
content class Person {
expressions private String name;
Beangenerator
Predefined
Predefined
base
baseelements
elements
Initiator Responder
SUBSCRIBE
[AGREE]
[agreed]
INFORM 0-n
[agreed]
FAILURE
[failed]
The Hague, 12/10/04
Support for interaction protocols
• Distributed as an add-on
• Examples of potential threats:
– A malicious agent can request the AMS to kill another agent
– A malicious agent can request the AMS to shutdown the platform
– A malicious entity can sniff or tamper sensible information
included in an ACLMessage
• Prevents the above threats by providing support for:
– Authentication and authorization
User John
--- --- User Alice --- ---
Alice XYZ
----- - ----- -
Bob KHJ
-- --
John QPO
policy file
Owns Main policy file
A password file
Owns A A
Container 2
Owns
Container 1 --- ---
User Bob
----- -
--
policy file
The Hague, 12/10/04
Policy file
• The Security add-on comes with a complete guide and some code
examples.
• All MIDP applications are called MIDlets and their main class
extends javax.microedition.midlet.MIDlet.
• JADE-LEAP for MIDP is itself a MIDlet
– The main class is jade.MicroBoot
• A MIDlet must be packaged as a single JAR file
– A JADE-based MIDlet JAR file must include both JADE-LEAP
classes and application specific classes and resources (e.g.
images)
•Questions?