Class AnnotationHandler

java.lang.Object
org.atmosphere.cpr.AnnotationHandler

public class AnnotationHandler extends Object
A class that handles the results of an annotation scan. This class contains the logic that maps an annotation type to the corresponding framework setup.

Processors with AtmosphereAnnotation.priority() > 0 are deferred until processDeferred(AtmosphereFramework) is called after all scanning completes. This ensures that higher-priority processors (e.g. coordinators) run after default-priority processors (e.g. agents) have registered their endpoints.

  • Constructor Details

    • AnnotationHandler

      public AnnotationHandler()
  • Method Details

    • flushCoreAnnotations

      public AnnotationHandler flushCoreAnnotations(Set<Class<?>> classes)
    • handleProcessor

      public Class<? extends Processor<?>> handleProcessor(Class<?> clazz)
    • handledClass

      public Class<? extends Annotation>[] handledClass()
    • handleAnnotation

      public AnnotationHandler handleAnnotation(AtmosphereFramework framework, Class<? extends Annotation> annotation, Class<?> discoveredClass)
    • processDeferred

      public void processDeferred(AtmosphereFramework framework)
      Process all deferred annotations, sorted by priority (lower first). Call this after all scanning is complete to ensure default-priority processors have registered their endpoints.
    • destroy

      public void destroy()