org.atmosphere.cpr
Class DefaultAnnotationProcessor

java.lang.Object
  extended by org.atmosphere.cpr.DefaultAnnotationProcessor
All Implemented Interfaces:
AnnotationProcessor

public class DefaultAnnotationProcessor
extends Object
implements AnnotationProcessor

An AnnotationProcessor that selects between a ServletContextInitializer based scanner, and a bytecode based scanner based on .

Author:
Jeanfrancois Arcand

Field Summary
static String ANNOTATION_ATTRIBUTE
          The attribute name under which the annotations are stored in the servlet context.
 
Constructor Summary
DefaultAnnotationProcessor()
           
 
Method Summary
 AnnotationProcessor configure(AtmosphereFramework framework)
          Configure this class with an instance of AtmosphereFramework
 void destroy()
          Destroy all resources associated with this object.
 AnnotationProcessor scan(File rootDir)
          Scan the File looking for classes annotated with Atmosphere's Service annotation.
 AnnotationProcessor scan(String packageName)
          Scan the package looking for classes annotated with Atmosphere's Service annotation.
 AnnotationProcessor scanAll()
          Scan all classes on the classpath looking for classes annotated with Atmosphere's Service annotation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ANNOTATION_ATTRIBUTE

public static final String ANNOTATION_ATTRIBUTE
The attribute name under which the annotations are stored in the servlet context.

See Also:
Constant Field Values
Constructor Detail

DefaultAnnotationProcessor

public DefaultAnnotationProcessor()
Method Detail

configure

public AnnotationProcessor configure(AtmosphereFramework framework)
Description copied from interface: AnnotationProcessor
Configure this class with an instance of AtmosphereFramework

Specified by:
configure in interface AnnotationProcessor
Parameters:
framework - the AtmosphereFramework
Returns:
this

scan

public AnnotationProcessor scan(File rootDir)
                         throws IOException
Description copied from interface: AnnotationProcessor
Scan the File looking for classes annotated with Atmosphere's Service annotation.

Specified by:
scan in interface AnnotationProcessor
Parameters:
rootDir - a directory where annotation can possibly be defined
Returns:
this
Throws:
IOException

scan

public AnnotationProcessor scan(String packageName)
                         throws IOException
Description copied from interface: AnnotationProcessor
Scan the package looking for classes annotated with Atmosphere's Service annotation.

Specified by:
scan in interface AnnotationProcessor
Parameters:
packageName - package name
Returns:
this
Throws:
IOException

scanAll

public AnnotationProcessor scanAll()
                            throws IOException
Description copied from interface: AnnotationProcessor
Scan all classes on the classpath looking for classes annotated with Atmosphere's Service annotation.

Specified by:
scanAll in interface AnnotationProcessor
Returns:
this
Throws:
IOException

destroy

public void destroy()
Description copied from interface: AnnotationProcessor
Destroy all resources associated with this object. Once destroyed, this object can no longer be used.

Specified by:
destroy in interface AnnotationProcessor


Copyright © 2013. All Rights Reserved.