public class MessageBrokerFactoryBean extends Object implements FactoryBean<flex.messaging.MessageBroker>, BeanClassLoaderAware, BeanNameAware, ResourceLoaderAware, InitializingBean, DisposableBean, ServletContextAware
FactoryBean that creates a local MessageBroker instance within a Spring web application context. The
resulting Spring-managed MessageBroker can be used to export Spring beans for direct remoting from a Flex client.
By default, this FactoryBean will look for a BlazeDS config file at /WEB-INF/flex/services-config.xml. This location
may be overridden using the servicesConfigPath property. Spring's ResourceLoader abstraction is used to load
the config resources, so the location may be specified using ant-style paths.
The initialization of the MessageBroker logically consists of two phases:
MessageBrokerConfigProcessor instances with this FactoryBean via the configProcessors property.
Http-based messages should be routed to the MessageBroker using the DispatcherServlet in combination with the
MessageBrokerHandlerAdapter.
MessageBrokerHandlerAdapter,
MessageBrokerConfigProcessor| Constructor and Description |
|---|
MessageBrokerFactoryBean() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
void |
destroy() |
Set<MessageBrokerConfigProcessor> |
getConfigProcessors()
Return the set of configuration processors that can customize the created
MessageBroker |
flex.messaging.MessageBroker |
getObject() |
Class<? extends flex.messaging.MessageBroker> |
getObjectType() |
boolean |
isSingleton() |
void |
setBeanClassLoader(ClassLoader classLoader) |
void |
setBeanName(String name) |
void |
setConfigProcessors(Set<MessageBrokerConfigProcessor> startupProcessors) |
void |
setConfigurationManager(flex.messaging.config.ConfigurationManager configurationManager) |
void |
setResourceLoader(ResourceLoader resourceLoader) |
void |
setServicesConfigPath(String servicesConfigPath) |
void |
setServletContext(javax.servlet.ServletContext servletContext) |
public void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface InitializingBeanExceptionpublic void destroy()
throws Exception
destroy in interface DisposableBeanExceptionpublic Set<MessageBrokerConfigProcessor> getConfigProcessors()
MessageBrokerpublic flex.messaging.MessageBroker getObject()
throws Exception
getObject in interface FactoryBean<flex.messaging.MessageBroker>Exceptionpublic Class<? extends flex.messaging.MessageBroker> getObjectType()
getObjectType in interface FactoryBean<flex.messaging.MessageBroker>public boolean isSingleton()
isSingleton in interface FactoryBean<flex.messaging.MessageBroker>public void setBeanClassLoader(ClassLoader classLoader)
setBeanClassLoader in interface BeanClassLoaderAwarepublic void setBeanName(String name)
setBeanName in interface BeanNameAwarepublic void setConfigProcessors(Set<MessageBrokerConfigProcessor> startupProcessors)
startupProcessors - public void setConfigurationManager(flex.messaging.config.ConfigurationManager configurationManager)
configurationManager - public void setResourceLoader(ResourceLoader resourceLoader)
setResourceLoader in interface ResourceLoaderAwarepublic void setServicesConfigPath(String servicesConfigPath)
servicesConfigPath - public void setServletContext(javax.servlet.ServletContext servletContext)
setServletContext in interface ServletContextAwareCopyright © 2014. All rights reserved.