return this;
}
private void scanForAnnotation(AtmosphereFramework f) {
List<String> packages = f.customAnnotationPackages();
AnnotationDetector detector = new AnnotationDetector(atmosphereReporter);
try {
if (packages.size() > 0) {
for (String p : packages) {
logger.trace("Package {} scanned for @AtmosphereAnnotation", p);
detector.detect(p);
}
}
// Now look for application defined annotation
String path = IOUtils.realPath(f.getServletContext(), f.getHandlersPath());
if (path != null) {
detector.detect(new File(path));
}
// JBoss|vfs with APR issue, or any strange containers may fail. This is a hack for them.
// https://github.com/Atmosphere/atmosphere/issues/1292
if (!coreAnnotationsFound.get()) {
fallbackToManualAnnotatedClasses(getClass(), f, handler);
}
} catch (IOException e) {
logger.warn("Unable to scan annotation", e);
} finally {
detector.destroy();
}
}