Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Spring BlazeDS Integration
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.springframework.flex.core
Class MessageBrokerFactoryBean

    java.lang.Object
      org.springframework.flex.core.MessageBrokerFactoryBean

All Implemented Interfaces:
  BeanClassLoaderAware, BeanNameAware, DisposableBean, FactoryBean<MessageBroker>, InitializingBean, ResourceLoaderAware, ServletContextAware

    public class MessageBrokerFactoryBean

extends Object
implements FactoryBean<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:

1. Parsing the BlazeDS XML configuration files and applying their settings to a newly created MessageBroker
2. Starting the MessageBroker and its services

Further custom configuration of the MessageBroker can be achieved through registering custom `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`.

Author:
  Jeremy Grelle
See Also:
  `MessageBrokerHandlerAdapter`, `MessageBrokerConfigProcessor`

Constructor Summary
`MessageBrokerFactoryBean()`

Method Summary
`void` | `afterPropertiesSet()`
`void` | `destroy()`
`Set<MessageBrokerConfigProcessor>` | `getConfigProcessors()` Return the set of configuration processors that can customize the created `MessageBroker`
`MessageBroker` | `getObject()`
`Class<? extends MessageBroker>` | `getObjectType()`
`boolean` | `isSingleton()`
`void` | `setBeanClassLoader(ClassLoader classLoader)`
`void` | `setBeanName(String name)`
`void` | `setConfigProcessors(Set<MessageBrokerConfigProcessor> startupProcessors)`
`void` | `setConfigurationManager(ConfigurationManager configurationManager)`
`void` | `setResourceLoader(ResourceLoader resourceLoader)`
`void` | `setServicesConfigPath(String servicesConfigPath)`
`void` | `setServletContext(javax.servlet.ServletContext servletContext)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### MessageBrokerFactoryBean

    public MessageBrokerFactoryBean()

Method Detail

### afterPropertiesSet

    public void afterPropertiesSet()
                            throws Exception

  Specified by:
    `afterPropertiesSet` in interface `InitializingBean`
  Throws:
    `Exception`

### destroy

    public void destroy()
                 throws Exception

  Specified by:
    `destroy` in interface `DisposableBean`
  Throws:
    `Exception`

### getConfigProcessors

    public Set<MessageBrokerConfigProcessor> getConfigProcessors()

  Return the set of configuration processors that can customize the created `MessageBroker`

  Returns:
    the config processors

### getObject

    public MessageBroker getObject()
                            throws Exception

  Specified by:
    `getObject` in interface `FactoryBean<MessageBroker>`
  Throws:
    `Exception`

### getObjectType

    public Class<? extends MessageBroker> getObjectType()

  Specified by:
    `getObjectType` in interface `FactoryBean<MessageBroker>`

### isSingleton

    public boolean isSingleton()

  Specified by:
    `isSingleton` in interface `FactoryBean<MessageBroker>`

### setBeanClassLoader

    public void setBeanClassLoader(ClassLoader classLoader)

  Specified by:
    `setBeanClassLoader` in interface `BeanClassLoaderAware`

### setBeanName

    public void setBeanName(String name)

  Specified by:
    `setBeanName` in interface `BeanNameAware`

### setConfigProcessors

    public void setConfigProcessors(Set<MessageBrokerConfigProcessor> startupProcessors)

  Parameters:
    `startupProcessors` -

### setConfigurationManager

    public void setConfigurationManager(ConfigurationManager configurationManager)

  Parameters:
    `configurationManager` -

### setResourceLoader

    public void setResourceLoader(ResourceLoader resourceLoader)

  Specified by:
    `setResourceLoader` in interface `ResourceLoaderAware`

### setServicesConfigPath

    public void setServicesConfigPath(String servicesConfigPath)

  Parameters:
    `servicesConfigPath` -

### setServletContext

    public void setServletContext(javax.servlet.ServletContext servletContext)

  Specified by:
    `setServletContext` in interface `ServletContextAware`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Spring BlazeDS Integration
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2011. All Rights Reserved.