Package org.atmosphere.cpr
Class DefaultAnnotationProcessor
- java.lang.Object
-
- org.atmosphere.cpr.DefaultAnnotationProcessor
-
- All Implemented Interfaces:
AnnotationProcessor,AtmosphereConfigAware
public class DefaultAnnotationProcessor extends java.lang.Object implements AnnotationProcessor
AnAnnotationProcessorthat selects between a ServletContextInitializer based scanner, and a bytecode based scanner based on .- Author:
- Jeanfrancois Arcand
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringANNOTATION_ATTRIBUTEThe attribute name under which the annotations are stored in the servlet context.
-
Constructor Summary
Constructors Constructor Description DefaultAnnotationProcessor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconfigure(AtmosphereConfig config)Configure an AtmosphereFramework object.voiddestroy()Destroy all resources associated with this object.AnnotationProcessorscan(java.io.File rootDir)Scan theFilelooking for classes annotated with Atmosphere's Service annotation.AnnotationProcessorscan(java.lang.String packageName)Scan the package looking for classes annotated with Atmosphere's Service annotation.AnnotationProcessorscanAll()Scan all classes on the classpath looking for classes annotated with Atmosphere's Service annotation.
-
-
-
Field Detail
-
ANNOTATION_ATTRIBUTE
public static final java.lang.String ANNOTATION_ATTRIBUTE
The attribute name under which the annotations are stored in the servlet context.- See Also:
- Constant Field Values
-
-
Method Detail
-
configure
public void configure(AtmosphereConfig config)
Description copied from interface:AtmosphereConfigAwareConfigure an AtmosphereFramework object.- Specified by:
configurein interfaceAtmosphereConfigAware- Parameters:
config-AtmosphereConfig
-
scan
public AnnotationProcessor scan(java.io.File rootDir) throws java.io.IOException
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:
java.io.IOException
-
scan
public AnnotationProcessor scan(java.lang.String packageName) throws java.io.IOException
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:
java.io.IOException
-
scanAll
public AnnotationProcessor scanAll() throws java.io.IOException
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:
java.io.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
-
-