getContentManager().registerLanguage(codec, FIPANames.ContentLanguage.FIPA_SL2);
getContentManager().registerLanguage(codec, FIPANames.ContentLanguage.FIPA_SL);
// Register to be notified about the REATTACHED event in order to handle Main Container faults
try {
NotificationHelper helper = (NotificationHelper) getHelper(NotificationService.NAME);
myContainerListener = new ContainerAdapter() {
public void reattached(ContainerEvent ev) {
// The Main Container lost my subscription --> Subscribe again
send(getSubscribe());
}
};
helper.registerContainerListener(myContainerListener);
}
catch (ServiceException se) {
// Just print a warning since this does not affect the normal operation of a ToolAgent
logger.log(Logger.WARNING, "NotificationService not installed. Some tool may not work properly.");
}