}
// Parse arguments
if (url == null) {
MLET_LOGGER.logp(Level.FINER, MLet.class.getName(),
mth, "URL is null");
throw new ServiceNotFoundException("The specified URL is null");
} else {
url = url.replace(File.separatorChar,'/');
}
if (MLET_LOGGER.isLoggable(Level.FINER)) {
MLET_LOGGER.logp(Level.FINER, MLet.class.getName(),
mth, "<URL = " + url + ">");
}
// Parse URL
try {
MLetParser parser = new MLetParser();
mletList = parser.parseURL(url);
} catch (Exception e) {
final String msg =
"Problems while parsing URL [" + url +
"], got exception [" + e.toString() + "]";
MLET_LOGGER.logp(Level.FINER, MLet.class.getName(), mth, msg);
throw EnvHelp.initCause(new ServiceNotFoundException(msg), e);
}
// Check that the list of MLets is not empty
if (mletList.size() == 0) {
final String msg =
"File " + url + " not found or MLET tag not defined in file";
MLET_LOGGER.logp(Level.FINER, MLet.class.getName(), mth, msg);
throw new ServiceNotFoundException(msg);
}
// Walk through the list of MLets
Set<Object> mbeans = new HashSet<Object>();
for (MLetContent elmt : mletList) {