|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mortbay.jetty.spring.SpringConfigurationProcessor
public class SpringConfigurationProcessor
Spring ConfigurationProcessor
A ConfigurationProcessor that uses a spring XML file to emulate the XmlConfiguration format.
XmlConfiguration expects a primary object that is either passed in to a call to configure(Object)
or that is constructed by a call to configure(). This processor looks for a bean definition
with an id, name or alias of "Main" as uses that as the primary bean.
The objects mapped by XmlConfiguration.getIdMap() are set as singletons before any configuration calls
and if the spring configuration file contains a definition for the singleton id, the the singleton is updated
with a call to AbstractAutowireCapableBeanFactory.configureBean(Object, String).
The property map obtained via XmlConfiguration.getProperties() is set as a singleton called "properties"
and values can be accessed by somewhat verbose
usage of org.springframework.beans.factory.config.MethodInvokingFactoryBean.
This processor is returned by the SpringConfigurationProcessorFactory for any XML document whos first
element is "beans". The factory is discovered by a ServiceLoader for ConfigurationProcessorFactory.
| Constructor Summary | |
|---|---|
SpringConfigurationProcessor()
|
|
| Method Summary | |
|---|---|
Object |
configure()
Return a configured bean. |
Object |
configure(Object obj)
|
void |
init(URL url,
XmlParser.Node config,
Map<String,Object> idMap,
Map<String,String> properties)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SpringConfigurationProcessor()
| Method Detail |
|---|
public void init(URL url,
XmlParser.Node config,
Map<String,Object> idMap,
Map<String,String> properties)
init in interface ConfigurationProcessor
public Object configure(Object obj)
throws Exception
configure in interface ConfigurationProcessorException
public Object configure()
throws Exception
configure in interface ConfigurationProcessorExceptionConfigurationProcessor.configure()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||