|
spring-web | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springframework.web.context.support.ServletContextFactoryBean
@Deprecated public class ServletContextFactoryBean
FactoryBean that exposes the ServletContext for bean references.
Can be used as alternative to implementing the ServletContextAware
callback interface. Allows for passing the ServletContext reference
to a constructor argument or any custom bean property.
Note that there's a special FactoryBean for exposing a specific ServletContext attribute, named ServletContextAttributeFactoryBean. So if all you need from the ServletContext is access to a specific attribute, ServletContextAttributeFactoryBean allows you to expose a constructor argument or bean property of the attribute type, which is a preferable to a dependency on the full ServletContext.
ServletContext,
ServletContextAware,
ServletContextAttributeFactoryBean,
WebApplicationContext.SERVLET_CONTEXT_BEAN_NAME| Constructor Summary | |
|---|---|
ServletContextFactoryBean()
Deprecated. |
|
| Method Summary | |
|---|---|
javax.servlet.ServletContext |
getObject()
Deprecated. |
java.lang.Class<? extends javax.servlet.ServletContext> |
getObjectType()
Deprecated. |
boolean |
isSingleton()
Deprecated. |
void |
setServletContext(javax.servlet.ServletContext servletContext)
Deprecated. Set the ServletContext that this object runs in. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ServletContextFactoryBean()
| Method Detail |
|---|
public void setServletContext(javax.servlet.ServletContext servletContext)
ServletContextAwareInvoked after population of normal bean properties but before an init
callback like InitializingBean's afterPropertiesSet or a
custom init-method. Invoked after ApplicationContextAware's
setApplicationContext.
setServletContext in interface ServletContextAwareservletContext - ServletContext object to be used by this objectInitializingBean.afterPropertiesSet(),
ApplicationContextAware.setApplicationContext(org.springframework.context.ApplicationContext)public javax.servlet.ServletContext getObject()
getObject in interface org.springframework.beans.factory.FactoryBean<javax.servlet.ServletContext>public java.lang.Class<? extends javax.servlet.ServletContext> getObjectType()
getObjectType in interface org.springframework.beans.factory.FactoryBean<javax.servlet.ServletContext>public boolean isSingleton()
isSingleton in interface org.springframework.beans.factory.FactoryBean<javax.servlet.ServletContext>
|
spring-web | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||