My favorites | Sign in
Project Home Downloads Wiki Issues Source
Checkout   Browse   Changes    
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package com.dantwining.jade.oo;

import jade.core.Agent;
import jade.oo.core.behaviours.Behaviour;
import jade.oo.core.behaviours.Inbox;
import jade.oo.core.behaviours.InboxImpl;
import jade.oo.core.behaviours.Outbox;
import jade.oo.core.behaviours.OutboxImpl;

@SuppressWarnings("serial")
public class TimeResponderAgent extends Agent {

@Override
protected void setup() {

Inbox inbox = new InboxImpl(this);
Outbox outbox = new OutboxImpl(this);
TimeResponderAction timeTeller = new TimeResponderAction(outbox);
Behaviour timeResponder = new TimeRequestResponder(inbox,
timeTeller);
addBehaviour(timeResponder);

// Add this behaviour *instead of* the one above if you want to see the
// original Behaviour in action
// addBehaviour(new TimeResponderJadeBehaviour());
}
}

Change log

r16 by dantwining on Apr 28, 2010   Diff
Updated the action() mechanism to return
BehaviourState objects. Removed
CyclicBehaviour as a consequence.
Go to: 
Project members, sign in to write a code review

Older revisions

r15 by dantwining on Apr 8, 2010   Diff
Added message template parameter to
receive method on inbox. Renamed
TellTheTime and AskTheTime as
TimeResponderAction and
TimeRequestorAction. Updated test to
...
r14 by dantwining on Apr 1, 2010   Diff
Added a standard JADE behaviour to
show how it's currently done.
r11 by dantwining on Mar 28, 2010   Diff
Added run target to build.xml to
launch jade-oo example. example runs
with ticker and message receiver
behaviours. replies aren't being
picked up; TimeRequestor inbox will
...
All revisions of this file

File info

Size: 866 bytes, 27 lines

File properties

svn:mime-type
text/plain
Powered by Google Project Hosting