Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 9868c111 authored by Jérôme Euzenat's avatar Jérôme Euzenat
Browse files

- upgrading Jade to version 3.7

- updated README in examples (hierarchy in lib)
- updated JadeFIPAAServiceAgent (Properties instead of Parameters)
parent 457cd2d2
No related branches found
No related tags found
No related merge requests found
......@@ -4,7 +4,7 @@ This example is a JADE based GUI client for the Alignment Server
Compiling
---------
$ javac -classpath ../../lib/jade.jar *.java
$ javac -classpath ../../lib/jade/jade.jar *.java
$ jar cvf JADEFIPAASRequesterAgent.jar *.class
......@@ -14,5 +14,5 @@ Launching
Beware, the server must be launched before:
$ java -jar ../../lib/alignsvc.jar -H -A &
$ java -cp .:../../lib/Jade.jar:JADEFIPAASRequesterAgent.jar jade.Boot -container -host localhost -port 8888 Control:JADEFIPAASRequesterAgent
$ java -cp .:../../lib/jade/jade.jar:JADEFIPAASRequesterAgent.jar jade.Boot -container -host localhost -port 8888 Control:JADEFIPAASRequesterAgent
No preview for this file type
No preview for this file type
No preview for this file type
This diff is collapsed.
3.3
......@@ -22,8 +22,8 @@
package fr.inrialpes.exmo.align.service.jade;
import java.util.Iterator;
import java.util.Properties;
import jade.content.ContentElement;
import jade.content.ContentManager;
......@@ -69,7 +69,7 @@ public class JadeFIPAAServiceAgent extends Agent {
private String serverId;
private AServProtocolManager manager;
private int localId=0;
private BasicParameters initialParameters;
private Properties initialParameters;
// FIPA ACL stuff
......@@ -100,7 +100,7 @@ public class JadeFIPAAServiceAgent extends Agent {
}**/
manager=(AServProtocolManager) args[0];
initialParameters = (BasicParameters) args[1];
initialParameters = (Properties)args[1];
}
myId = "LocalJADEInterface";
......@@ -114,7 +114,7 @@ public class JadeFIPAAServiceAgent extends Agent {
String perf; // performative
String info; //parameters
BasicParameters params = initialParameters;
Properties params = initialParameters;
MessageTemplate tpl =MessageTemplate.and(MessageTemplate.and(
MessageTemplate.MatchLanguage( codec.getName()),
......@@ -174,7 +174,7 @@ public class JadeFIPAAServiceAgent extends Agent {
}else if (ce instanceof METADATA){
//TODO
}else if (ce instanceof STORE){
Message answer = manager.store(new Message(newId(), (Message)null,myId,serverId,params.getParameter("id"),params));
Message answer = manager.store(new Message(newId(), (Message)null,myId,serverId,params.getProperty("id"),params));
if(!(answer instanceof ErrorMsg)){
ACLMessage JADEanswer=msg.createReply();
JADEanswer.setLanguage(codec.getName());
......@@ -258,12 +258,12 @@ public class JadeFIPAAServiceAgent extends Agent {
private int newId(){return localId++;}
private BasicParameters decodeMessage(ContentElement ce, BasicParameters param){
BasicParameters toReturn = param;
private Properties decodeMessage(ContentElement ce, Properties param){
Properties toReturn = param;
Action action= (Action)ce;
for( Iterator<Parameter> iter = action.getAllHasParameter(); iter.hasNext(); ){
Parameter OntoParam = iter.next();
toReturn.setParameter( OntoParam.getName(), OntoParam.getValue() );
toReturn.setProperty( OntoParam.getName(), OntoParam.getValue() );
}
return toReturn;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment