org.springframework.context.access
Class ContextBeanFactoryReference
java.lang.Object
org.springframework.context.access.ContextBeanFactoryReference
- All Implemented Interfaces:
- org.springframework.beans.factory.access.BeanFactoryReference
public class ContextBeanFactoryReference
- extends java.lang.Object
- implements org.springframework.beans.factory.access.BeanFactoryReference
ApplicationContext-specific implementation of BeanFactoryReference,
wrapping a newly created ApplicationContext, closing it on release.
As per BeanFactoryReference contract, release
may be called
more than once, with subsequent calls not doing anything. However, calling
getFactory
after a release
call will cause an exception.
- Since:
- 13.02.2004
- Author:
- Juergen Hoeller, Colin Sampaleanu
- See Also:
ConfigurableApplicationContext.close()
Method Summary |
org.springframework.beans.factory.BeanFactory |
getFactory()
|
void |
release()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ContextBeanFactoryReference
public ContextBeanFactoryReference(ApplicationContext applicationContext)
- Create a new ContextBeanFactoryReference for the given context.
- Parameters:
applicationContext
- the ApplicationContext to wrap
getFactory
public org.springframework.beans.factory.BeanFactory getFactory()
- Specified by:
getFactory
in interface org.springframework.beans.factory.access.BeanFactoryReference
release
public void release()
- Specified by:
release
in interface org.springframework.beans.factory.access.BeanFactoryReference