Class AbstractDelegateController

  • All Implemented Interfaces:
    org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware

    @Controller
    public abstract class AbstractDelegateController
    extends java.lang.Object
    implements org.springframework.context.ApplicationContextAware
    Abstract class to be extended by all controllers that may become a delegate. All subclass must implement the canHandle method to say if they can handle a request or not.
    Since:
    4.2.0
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected org.springframework.context.ApplicationContext applicationContext
      Application context.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      abstract boolean canHandle​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
      Determine if a AbstractDelegateController subclass can handle the current request.
      protected abstract org.springframework.web.servlet.ModelAndView handleRequestInternal​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
      Handle request internal.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.springframework.context.ApplicationContextAware

        setApplicationContext
    • Field Detail

      • applicationContext

        protected org.springframework.context.ApplicationContext applicationContext
        Application context.
    • Constructor Detail

      • AbstractDelegateController

        public AbstractDelegateController()
    • Method Detail

      • canHandle

        public abstract boolean canHandle​(javax.servlet.http.HttpServletRequest request,
                                          javax.servlet.http.HttpServletResponse response)
        Determine if a AbstractDelegateController subclass can handle the current request.
        Parameters:
        request - the current request
        response - the response
        Returns:
        true if the controller can handler the request, false otherwise
      • handleRequestInternal

        protected abstract org.springframework.web.servlet.ModelAndView handleRequestInternal​(javax.servlet.http.HttpServletRequest request,
                                                                                              javax.servlet.http.HttpServletResponse response)
                                                                                       throws java.lang.Exception
        Handle request internal.
        Parameters:
        request - the request
        response - the response
        Returns:
        the model and view
        Throws:
        java.lang.Exception - the exception