org.restlet.ext.spring
Class SpringContext
java.lang.Object
org.springframework.core.io.DefaultResourceLoader
org.springframework.context.support.AbstractApplicationContext
org.springframework.context.support.GenericApplicationContext
org.restlet.ext.spring.SpringContext
- All Implemented Interfaces:
- BeanFactory, DisposableBean, HierarchicalBeanFactory, ListableBeanFactory, BeanDefinitionRegistry, ApplicationContext, ApplicationEventPublisher, ConfigurableApplicationContext, Lifecycle, MessageSource, AliasRegistry, ResourceLoader, ResourcePatternResolver
public class SpringContext
- extends GenericApplicationContext
Spring application context based on a Restlet context. Here is an example
illustrating the various ways to use this class:
SpringContext springContext = new SpringContext(getContext());
springContext.getPropertyConfigRefs().add("war://config/database.properties");
springContext.getXmlConfigRefs().add("war://config/applicationContext.xml");
springContext.getXmlConfigRefs().add(
"file:///C/myApp/config/applicationContext.xml");
springContext.getXmlConfigRefs().add(
"clap://thread/config/applicationContext.xml");
- Author:
- Jerome Louvel
Method Summary |
java.util.List<java.lang.String> |
getPropertyConfigRefs()
Returns the modifiable list of configuration URIs for beans definitions
via property representations. |
Context |
getRestletContext()
Returns the parent Restlet context. |
java.util.List<java.lang.String> |
getXmlConfigRefs()
Returns the modifiable list of configuration URIs for beans definitions
via XML representations. |
void |
refresh()
|
Methods inherited from class org.springframework.context.support.GenericApplicationContext |
closeBeanFactory, getBeanDefinition, getBeanFactory, getDefaultListableBeanFactory, getResource, getResources, isAlias, isBeanNameInUse, refreshBeanFactory, registerAlias, registerBeanDefinition, removeAlias, removeBeanDefinition, setParent, setResourceLoader |
Methods inherited from class org.springframework.context.support.AbstractApplicationContext |
addApplicationListener, addBeanFactoryPostProcessor, addListener, cancelRefresh, close, containsBean, containsBeanDefinition, containsLocalBean, destroy, destroyBeans, doClose, finishBeanFactoryInitialization, finishRefresh, getAliases, getApplicationListeners, getAutowireCapableBeanFactory, getBean, getBean, getBean, getBeanDefinitionCount, getBeanDefinitionNames, getBeanFactoryPostProcessors, getBeanNamesForType, getBeanNamesForType, getBeansOfType, getBeansOfType, getDisplayName, getId, getInternalParentBeanFactory, getInternalParentMessageSource, getMessage, getMessage, getMessage, getParent, getParentBeanFactory, getResourcePatternResolver, getStartupDate, getType, initApplicationEventMulticaster, initMessageSource, invokeBeanFactoryPostProcessors, isActive, isPrototype, isRunning, isSingleton, isTypeMatch, obtainFreshBeanFactory, onClose, onRefresh, postProcessBeanFactory, prepareBeanFactory, prepareRefresh, publishEvent, registerBeanPostProcessors, registerListeners, registerShutdownHook, setDisplayName, setId, start, stop, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
SpringContext
public SpringContext(Context restletContext)
- Constructor.
- Parameters:
restletContext
- The parent Restlet context.
getPropertyConfigRefs
public java.util.List<java.lang.String> getPropertyConfigRefs()
- Returns the modifiable list of configuration URIs for beans definitions
via property representations.
- Returns:
- The modifiable list of configuration URIs.
getRestletContext
public Context getRestletContext()
- Returns the parent Restlet context.
- Returns:
- The parent Restlet context.
getXmlConfigRefs
public java.util.List<java.lang.String> getXmlConfigRefs()
- Returns the modifiable list of configuration URIs for beans definitions
via XML representations.
- Returns:
- The modifiable list of configuration URIs.
refresh
public void refresh()
- Specified by:
refresh
in interface ConfigurableApplicationContext
- Overrides:
refresh
in class AbstractApplicationContext
Copyright © 2005-2008 Noelios Technologies.