// get ports to listen
String ports = manager.getProperty("ports");
//
// check ports null
if (ports==null || "".equals(ports.trim()))
throw new TuboConsumerException("port property is empty or not configured");
//
// create tokenizer
StringTokenizer tokenizer = new StringTokenizer(ports,",",false);
//
// check number of tokens
if (tokenizer.countTokens()==0)
throw new TuboConsumerException("Ports not found");
//
// create Workers ejecutor
executor = Executors.newCachedThreadPool();
while (tokenizer.hasMoreElements()) {
//
// get port
String sport = tokenizer.nextToken();
//
// convert String port to int (FIXME: ver el error)
int port = 0;
try {
port = Integer.parseInt(sport);
} catch (NumberFormatException e) {
throw new TuboConsumerException("Malformat port number port="+sport);
}
//
// create worker for server socket accept
ServerSocketWorker worker = new ServerSocketWorker(manager,port);
//