if (connector == null) {
connector = connectorFactory.createConnector(port);
}
server.addConnector(connector);
if (handlers != null && handlers.size() > 0) {
HandlerList handlerList = new HandlerList();
for (Handler h : handlers) {
// filting the jetty default handler
// which should not be added at this point
if (h instanceof DefaultHandler) {
defaultHandler = (DefaultHandler) h;
} else {
handlerList.addHandler(h);
}
}
server.addHandler(handlerList);
}
contexts = new ContextHandlerCollection();