org.kuali.student.common.ws
Class ServletWrappingController

java.lang.Object
  extended by org.springframework.context.support.ApplicationObjectSupport
      extended by org.springframework.web.context.support.WebApplicationObjectSupport
          extended by org.springframework.web.servlet.support.WebContentGenerator
              extended by org.springframework.web.servlet.mvc.AbstractController
                  extended by org.kuali.student.common.ws.ServletWrappingController
All Implemented Interfaces:
BeanNameAware, DisposableBean, InitializingBean, ApplicationContextAware, ServletContextAware, Controller

public class ServletWrappingController
extends AbstractController
implements BeanNameAware, InitializingBean, DisposableBean

Spring Controller implementation that mimics standard ServletWrappingController behaviour (see its documentation), but with the important difference that it doesn't instantiate the Servlet instance directly but delegate for this the BeanContext, so that we can also use IoC.*


Nested Class Summary
private  class ServletWrappingController.DelegatingServletConfig
           
 
Field Summary
private  String beanName
           
private  Properties initParameters
           
private static Logger log
           
private  Class<? extends Servlet> servletClass
           
private  Servlet servletInstance
           
private  String servletName
           
 
Fields inherited from class org.springframework.web.servlet.support.WebContentGenerator
METHOD_GET, METHOD_HEAD, METHOD_POST
 
Fields inherited from class org.springframework.context.support.ApplicationObjectSupport
logger
 
Constructor Summary
ServletWrappingController()
           
 
Method Summary
 void afterPropertiesSet()
           
 void destroy()
           
protected  ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response)
           
 void setBeanName(String name)
           
 void setInitParameters(Properties initParameters)
           
 void setServletClass(Class<? extends Servlet> servletClass)
           
 void setServletInstance(Servlet servletInstance)
           
 void setServletName(String servletName)
           
 
Methods inherited from class org.springframework.web.servlet.mvc.AbstractController
handleRequest, isSynchronizeOnSession, setSynchronizeOnSession
 
Methods inherited from class org.springframework.web.servlet.support.WebContentGenerator
applyCacheSeconds, applyCacheSeconds, cacheForSeconds, cacheForSeconds, checkAndPrepare, checkAndPrepare, getCacheSeconds, getSupportedMethods, isRequireSession, isUseCacheControlHeader, isUseCacheControlNoStore, isUseExpiresHeader, preventCaching, setCacheSeconds, setRequireSession, setSupportedMethods, setUseCacheControlHeader, setUseCacheControlNoStore, setUseExpiresHeader
 
Methods inherited from class org.springframework.web.context.support.WebApplicationObjectSupport
getServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContext
 
Methods inherited from class org.springframework.context.support.ApplicationObjectSupport
getApplicationContext, getMessageSourceAccessor, initApplicationContext, requiredContextClass, setApplicationContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

servletClass

private Class<? extends Servlet> servletClass

servletName

private String servletName

initParameters

private Properties initParameters

beanName

private String beanName

servletInstance

private Servlet servletInstance

log

private static Logger log
Constructor Detail

ServletWrappingController

public ServletWrappingController()
Method Detail

setServletClass

public void setServletClass(Class<? extends Servlet> servletClass)

setServletName

public void setServletName(String servletName)

setInitParameters

public void setInitParameters(Properties initParameters)

setBeanName

public void setBeanName(String name)
Specified by:
setBeanName in interface BeanNameAware

setServletInstance

public void setServletInstance(Servlet servletInstance)

afterPropertiesSet

public void afterPropertiesSet()
                        throws Exception
Specified by:
afterPropertiesSet in interface InitializingBean
Throws:
Exception

handleRequestInternal

protected ModelAndView handleRequestInternal(HttpServletRequest request,
                                             HttpServletResponse response)
                                      throws Exception
Specified by:
handleRequestInternal in class AbstractController
Throws:
Exception

destroy

public void destroy()
Specified by:
destroy in interface DisposableBean


Copyright © 2007-2011 The Kuali Foundation. All Rights Reserved.