// Codecs
List l = myProfile.getSpecifiers(Profile.ACLCODECS);
Iterator codecs = l.iterator();
while (codecs.hasNext()) {
Specifier spec = (Specifier) codecs.next();
String className = spec.getClassName();
try{
Class c = Class.forName(className);
ACLCodec codec = (ACLCodec)c.newInstance();
messageEncodings.put(codec.getName().toLowerCase(), codec);
if (myLogger.isLoggable(Logger.CONFIG))
myLogger.log(Logger.CONFIG,"Installed "+ codec.getName()+ " ACLCodec implemented by " + className + "\n");
// FIXME: notify the AMS of the new Codec to update the APDescritption.
}
catch(ClassNotFoundException cnfe){
throw new jade.lang.acl.ACLCodec.CodecException("ERROR: The class " +className +" for the ACLCodec not found.", cnfe);
}
catch(InstantiationException ie) {
throw new jade.lang.acl.ACLCodec.CodecException("The class " + className + " raised InstantiationException (see NestedException)", ie);
}
catch(IllegalAccessException iae) {
throw new jade.lang.acl.ACLCodec.CodecException("The class " + className + " raised IllegalAccessException (see nested exception)", iae);
}
}
// MTPs
l = myProfile.getSpecifiers(Profile.MTPS);
PrintWriter f = null;
StringBuffer sb = null;
Iterator mtps = l.iterator();
while (mtps.hasNext()) {
Specifier spec = (Specifier) mtps.next();
String className = spec.getClassName();
String addressURL = null;
Object[] args = spec.getArgs();
if (args != null && args.length > 0) {
addressURL = args[0].toString();
if(addressURL.equals("")) {
addressURL = null;
}