org.apache.cocoon.spring.configurator.impl
Class ServletContextFactoryBean

java.lang.Object
  extended by org.apache.cocoon.spring.configurator.impl.ServletContextFactoryBean
All Implemented Interfaces:
FactoryBean, ServletContextAware

public class ServletContextFactoryBean
extends Object
implements FactoryBean, ServletContextAware

Simple Spring factory bean which provides the servlet context as a bean. This avoids a dependence to Springs ServletContextAware interface.

Since:
1.0
Version:
$Id: ServletContextFactoryBean.java 587750 2007-10-24 02:35:22Z vgritsenko $

Field Summary
protected static javax.servlet.ServletContext servletContext
           
 
Constructor Summary
ServletContextFactoryBean()
           
 
Method Summary
 Object getObject()
           
 Class getObjectType()
           
static javax.servlet.ServletContext getServletContext()
           
 boolean isSingleton()
           
 void setServletContext(javax.servlet.ServletContext context)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

servletContext

protected static javax.servlet.ServletContext servletContext
Constructor Detail

ServletContextFactoryBean

public ServletContextFactoryBean()
Method Detail

getServletContext

public static javax.servlet.ServletContext getServletContext()

setServletContext

public void setServletContext(javax.servlet.ServletContext context)
Specified by:
setServletContext in interface ServletContextAware
See Also:
ServletContextAware.setServletContext(javax.servlet.ServletContext)

getObject

public Object getObject()
                 throws Exception
Specified by:
getObject in interface FactoryBean
Throws:
Exception
See Also:
FactoryBean.getObject()

getObjectType

public Class getObjectType()
Specified by:
getObjectType in interface FactoryBean
See Also:
FactoryBean.getObjectType()

isSingleton

public boolean isSingleton()
Specified by:
isSingleton in interface FactoryBean
See Also:
FactoryBean.isSingleton()


Copyright © 1999-2009 The Apache Software Foundation. All Rights Reserved.