|
Spring BlazeDS Integration | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.flex.core.io.AbstractAmfConversionServiceConfigProcessor
org.springframework.flex.core.io.ClassPathScanningAmfConversionServiceConfigProcessor
public class ClassPathScanningAmfConversionServiceConfigProcessor
Generic extension of AbstractAmfConversionServiceConfigProcessor that configures the Spring ConversionService-based AMF
serialization/deserialization support via classpath scanning.
This implementation will recursively scan for classes starting with the base package provided in the
constructor.
By default, a SpringPropertyProxy will be registered for every class found in the scan.
The scanning process may be more finely tuned by providing TypeFilter implementations to be used in
including and
excluding specific classes. For example, you
can filter by RegEx patterns, custom annotations, or anything else that
can be used for matching in a TypeFilter.
This implementation does not register any additional Converters beyond those registered in the parent class.
Additional TypeConverters may be registered by extending this class and overriding
configureConverters.
The implementation is heavily derived from ClassPathScanningCandidateComponentProvider.
| Field Summary |
|---|
| Fields inherited from class org.springframework.flex.core.io.AbstractAmfConversionServiceConfigProcessor |
|---|
log |
| Constructor Summary | |
|---|---|
ClassPathScanningAmfConversionServiceConfigProcessor(String basePackage)
Create a ClassPathScanningAmfConversionServiceConfigProcessor |
|
| Method Summary | |
|---|---|
void |
addExcludeFilter(TypeFilter excludeFilter)
Add an exclude type filter to the front of the exclusion list. |
void |
addIncludeFilter(TypeFilter includeFilter)
Add an include type filter to the end of the inclusion list. |
void |
afterPropertiesSet()
|
protected boolean |
applyFilters(MetadataReader metadataReader)
Determine whether the given class does not match any exclude filter and does match at least one include filter. |
protected Set<Class<?>> |
findTypesToRegister()
Returns the set of types for which SpringPropertyProxy instances should be registered. |
ResourceLoader |
getResourceLoader()
Return the ResourceLoader used in locating matching resources. |
protected boolean |
isCandidateForAmf(AnnotationMetadata metadata)
Determine whether the given class qualifies for AMF conversion The default implementation checks whether the class is concrete (i.e. not abstract and not an interface). |
protected String |
resolveBasePackage(String basePackage)
Resolve the specified base package into a pattern specification for the package search path. |
void |
setBeanClassLoader(ClassLoader classLoader)
|
void |
setExcludeFilters(List<TypeFilter> excludeFilters)
Sets the list of type filters to use for exclusion. |
void |
setIncludeFilters(List<TypeFilter> includeFilters)
Sets the list of type filters to use for inclusion. |
void |
setResourceLoader(ResourceLoader resourceLoader)
Set the ResourceLoader to use for resource locations. |
void |
setResourcePattern(String resourcePattern)
Set the resource pattern to use when scanning the classpath. |
| Methods inherited from class org.springframework.flex.core.io.AbstractAmfConversionServiceConfigProcessor |
|---|
configureConverters, processAfterStartup, processBeforeStartup, registerAmfProxies, registerPropertyProxy, setConversionService, setUseDirectFieldAccess |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ClassPathScanningAmfConversionServiceConfigProcessor(String basePackage)
basePackage - the base package to scan for classes to be registered for AMF serialization/deserialization| Method Detail |
|---|
public void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface InitializingBeanafterPropertiesSet in class AbstractAmfConversionServiceConfigProcessorExceptionpublic void setBeanClassLoader(ClassLoader classLoader)
setBeanClassLoader in interface BeanClassLoaderAwarepublic void setResourceLoader(ResourceLoader resourceLoader)
Default is PathMatchingResourcePatternResolver, also capable of resource pattern resolving through the ResourcePatternResolver interface.
setResourceLoader in interface ResourceLoaderAwareResourcePatternResolver,
PathMatchingResourcePatternResolverpublic final ResourceLoader getResourceLoader()
public void setResourcePattern(String resourcePattern)
findTypesToRegister(),
DEFAULT_RESOURCE_PATTERNpublic void setIncludeFilters(List<TypeFilter> includeFilters)
public void setExcludeFilters(List<TypeFilter> excludeFilters)
public void addIncludeFilter(TypeFilter includeFilter)
public void addExcludeFilter(TypeFilter excludeFilter)
protected Set<Class<?>> findTypesToRegister()
SpringPropertyProxy instances should be registered.
findTypesToRegister in class AbstractAmfConversionServiceConfigProcessorprotected String resolveBasePackage(String basePackage)
The default implementation resolves placeholders against system properties, and converts a "."-based package path to a "/"-based resource path.
basePackage - the base package as specified by the user
protected boolean applyFilters(MetadataReader metadataReader)
throws IOException
metadataReader - the ASM ClassReader for the class
IOExceptionprotected boolean isCandidateForAmf(AnnotationMetadata metadata)
The default implementation checks whether the class is concrete (i.e. not abstract and not an interface). Can be overridden in subclasses.
metadata - the metadata for the class to check
|
Spring BlazeDS Integration | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||