@Override public AnnotationProcessor configure(final AtmosphereFramework framework) { ServletContext sc = framework.getServletContext(); Map<Class<? extends Annotation>, Set<Class<?>>> annotations = (Map<Class<? extends Annotation>, Set<Class<?>>>) sc.getAttribute(ANNOTATION_ATTRIBUTE); if (annotations == null || annotations.isEmpty()) { delegate = new BytecodeBasedAnnotationProcessor(); } else { delegate = new ServletContainerInitializerAnnotationProcessor(annotations, framework); } delegate.configure(framework); return this; }
/** * Creates an instance of ExecutorHandler. * * @param handlerClass handler class */ public ExecutorHandler(Class<?> handlerClass) { this( AnnotationProcessor.getHandlerMetadata(handlerClass), handlerClass, AnnotationProcessor.getHandlerMethod(handlerClass)); }
public synchronized EngineConfig deregisterAnnotationProcessor( AnnotationProcessor<?> annotationProcessor) { annotationProcessors.remove(annotationProcessor.getType()); return this; }
public synchronized EngineConfig registerAnnotationProcessor( AnnotationProcessor<?> annotationProcessor) { annotationProcessors.put(annotationProcessor.getType(), annotationProcessor); return this; }
@Override public void destroy() { if (delegate != null) { delegate.destroy(); } }
@Override public AnnotationProcessor scan(final String packageName) throws IOException { delegate.scan(packageName); return this; }
@Override public AnnotationProcessor scan(final File rootDir) throws IOException { delegate.scan(rootDir); return this; }