|
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
public abstract class AbstractAmfConversionServiceConfigProcessor
Base MessageBrokerConfigProcessor implementation that installs an alternative PropertyProxy implementation for
enhanced serialization and deserialization of specific types. The alternative implementation uses Sping's ConversionService
to allow specialized conversion of certain property types and is more flexible in the types it can handle.
The installed SpringPropertyProxy instances may be configured to use field-based property access (instead of requiring getters and setters) by
setting the useDirectFieldAccess property to true. Additionally,
types that do not have a default no-arg constructur can be handled, as long as they provide a constructor annotated with AmfCreator.
Subclasses are expected to supply their own mechanisms for determining the list of types to register and may apply additional configuration of the
ConversionService, such as provisioning additional custom Converters.
SpringPropertyProxy| Field Summary | |
|---|---|
protected org.apache.commons.logging.Log |
log
|
| Constructor Summary | |
|---|---|
AbstractAmfConversionServiceConfigProcessor()
|
|
| Method Summary | |
|---|---|
void |
afterPropertiesSet()
|
protected void |
configureConverters(ConverterRegistry registry)
Template method to allow subclasses to configure their own set of Converter instances. |
protected abstract Set<Class<?>> |
findTypesToRegister()
Returns the set of types for which SpringPropertyProxy instances should be registered. |
MessageBroker |
processAfterStartup(MessageBroker broker)
Apply this config processor to the newly created MessageBroker after it and all of its services have been
started but before it is available for use. |
MessageBroker |
processBeforeStartup(MessageBroker broker)
Apply this config processor to the newly created MessageBroker after its intial configuration settings
have been parsed from the BlazeDS XML configuration, but before it has actually been started. |
protected void |
registerAmfProxies(ConversionService conversionService,
boolean useDirectFieldAccess)
Called during initialization, the default implementation configures and registers a SpringPropertyProxy instance
for each type returned by findTypesToRegister. |
protected void |
registerPropertyProxy(SpringPropertyProxy proxy)
Registers the given SpringPropertyProxy with the BlazeDS PropertyProxyRegistry. |
void |
setConversionService(ConversionService conversionService)
Sets the ConversionService implementation to be used by all registered SpringPropertyProxy instances. |
void |
setUseDirectFieldAccess(boolean useDirectFieldAccess)
When true, configures the registered SpringPropertyProxy instances to access fields directly, rather than
requiring strict JavaBean compliance. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final org.apache.commons.logging.Log log
| Constructor Detail |
|---|
public AbstractAmfConversionServiceConfigProcessor()
| Method Detail |
|---|
public void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface InitializingBeanExceptionpublic final MessageBroker processAfterStartup(MessageBroker broker)
MessageBroker after it and all of its services have been
started but before it is available for use.
processAfterStartup in interface MessageBrokerConfigProcessorbroker - the started MessageBroker instance
MessageBrokerpublic final MessageBroker processBeforeStartup(MessageBroker broker)
MessageBroker after its intial configuration settings
have been parsed from the BlazeDS XML configuration, but before it has actually been started.
processBeforeStartup in interface MessageBrokerConfigProcessorbroker - the new MessageBroker instance
MessageBrokerpublic void setConversionService(ConversionService conversionService)
ConversionService implementation to be used by all registered SpringPropertyProxy instances.
conversionService - the conversion service to be usedpublic void setUseDirectFieldAccess(boolean useDirectFieldAccess)
SpringPropertyProxy instances to access fields directly, rather than
requiring strict JavaBean compliance. Defaults to false.
useDirectFieldAccess - determines whether fields should be accessed directly.
protected void registerAmfProxies(ConversionService conversionService,
boolean useDirectFieldAccess)
SpringPropertyProxy instance
for each type returned by findTypesToRegister.
conversionService - the conversion service to be used for property conversionuseDirectFieldAccess - determines whether fields should be accessed directlyprotected void registerPropertyProxy(SpringPropertyProxy proxy)
SpringPropertyProxy with the BlazeDS PropertyProxyRegistry.
proxy - the property proxy to registerprotected abstract Set<Class<?>> findTypesToRegister()
SpringPropertyProxy instances should be registered.
protected void configureConverters(ConverterRegistry registry)
Converter instances. This is a
convenient alternative to supplying a completely custom-configured ConversionService instance.
The default implementation does not register any additional Converters, thus subclasses do not need to delegate to it.
registry - - the converter registry used by the ConversionService
|
Spring BlazeDS Integration | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||