Package org.atmosphere.cpr
Class DefaultAnnotationProcessor
java.lang.Object
org.atmosphere.cpr.DefaultAnnotationProcessor
- All Implemented Interfaces:
AnnotationProcessor,AtmosphereConfigAware
An
AnnotationProcessor that selects between a ServletContextInitializer based scanner, and
a bytecode based scanner based on .
- Author:
- Jeanfrancois Arcand
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe attribute name under which the annotations are stored in the servlet context. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidconfigure(AtmosphereConfig config) Configure an AtmosphereFramework object.voiddestroy()Destroy all resources associated with this object.Scan theFilelooking for classes annotated with Atmosphere's Service annotation.Scan the package looking for classes annotated with Atmosphere's Service annotation.scanAll()Scan all classes on the classpath looking for classes annotated with Atmosphere's Service annotation.
-
Field Details
-
ANNOTATION_ATTRIBUTE
The attribute name under which the annotations are stored in the servlet context.- See Also:
-
-
Constructor Details
-
DefaultAnnotationProcessor
public DefaultAnnotationProcessor()
-
-
Method Details
-
configure
Description copied from interface:AtmosphereConfigAwareConfigure an AtmosphereFramework object.- Specified by:
configurein interfaceAtmosphereConfigAware- Parameters:
config-AtmosphereConfig
-
scan
Description copied from interface:AnnotationProcessorScan theFilelooking for classes annotated with Atmosphere's Service annotation.- Specified by:
scanin interfaceAnnotationProcessor- Parameters:
rootDir- a directory where annotation can possibly be defined- Returns:
- this
- Throws:
IOException
-
scan
Description copied from interface:AnnotationProcessorScan the package looking for classes annotated with Atmosphere's Service annotation.- Specified by:
scanin interfaceAnnotationProcessor- Parameters:
packageName- package name- Returns:
- this
- Throws:
IOException
-
scanAll
Description copied from interface:AnnotationProcessorScan all classes on the classpath looking for classes annotated with Atmosphere's Service annotation.- Specified by:
scanAllin interfaceAnnotationProcessor- Returns:
- this
- Throws:
IOException
-
destroy
public void destroy()Description copied from interface:AnnotationProcessorDestroy all resources associated with this object. Once destroyed, this object can no longer be used.- Specified by:
destroyin interfaceAnnotationProcessor
-