* @param conf
* @throws FtpException
*/
private void initFtplets(FtpletContainer container, Configuration conf) throws FtpException {
String ftpletNames = conf.getString("ftplets", null);
Configuration ftpletConf = conf.subset("ftplet");
if(ftpletNames == null) {
return;
}
//log = ftpConfig.getLogFactory().getInstance(getClass());
StringTokenizer st = new StringTokenizer(ftpletNames, " ,;\r\n\t");
try {
while(st.hasMoreTokens()) {
String ftpletName = st.nextToken();
LOG.info("Configuring ftplet : " + ftpletName);
// get ftplet specific configuration
Configuration subConfig = ftpletConf.subset(ftpletName);
Ftplet ftplet = (Ftplet) ConfigurationClassUtils.createBean(subConfig, DefaultFtplet.class.getName());
ftplet.init(this);
container.addFtplet(ftpletName, ftplet);
}