public IntrospectionServer(Agent a) {
super(a);
}
public void onStart() {
ContentManager cm = myAgent.getContentManager();
onto = IntrospectionOntology.getInstance();
cm.registerOntology(onto);
codec = cm.lookupLanguage(FIPANames.ContentLanguage.FIPA_SL);
if (codec == null) {
codec = cm.lookupLanguage(FIPANames.ContentLanguage.FIPA_SL2);
if (codec == null) {
codec = cm.lookupLanguage(FIPANames.ContentLanguage.FIPA_SL1);
if (codec == null) {
codec = cm.lookupLanguage(FIPANames.ContentLanguage.FIPA_SL0);
}
}
}
if (codec == null) {
codec = new SLCodec();
cm.registerLanguage(codec);
}
template = MessageTemplate.and(
MessageTemplate.MatchOntology(onto.getName()),
MessageTemplate.MatchPerformative(jade.lang.acl.ACLMessage.REQUEST) );