try {
Class.forName("org.apache.http.nio.NHttpServiceHandler");
} catch (ClassNotFoundException e) {
throw new ConfigurationException("NIO Handler not found in classpath, please ensure httpcore-nio exists in classpath.");
}
httpService = new EsperHttpServiceNIO(entry.getKey(), entry.getValue());
}
else {
httpService = new EsperHttpServiceClassic(entry.getKey(), entry.getValue());
}
services.put(entry.getKey(), httpService);