Class ManagedServletPipeline


  • class ManagedServletPipeline
    extends java.lang.Object
    A wrapping dispatcher for servlets, in much the same way as ManagedFilterPipeline is for filters.
    • Field Detail

      • REQUEST_DISPATCHER_REQUEST

        public static final java.lang.String REQUEST_DISPATCHER_REQUEST
        A Marker constant attribute that when present in the request indicates to Guice servlet that this request has been generated by a request dispatcher rather than the servlet pipeline. In accordance with section 8.4.2 of the Servlet 2.4 specification.
        See Also:
        Constant Field Values
    • Constructor Detail

      • ManagedServletPipeline

        @Inject
        public ManagedServletPipeline​(Injector injector)
    • Method Detail

      • hasServletsMapped

        boolean hasServletsMapped()
      • collectServletDefinitions

        private ServletDefinition[] collectServletDefinitions​(Injector injector)
        Introspects the injector and collects all instances of bound List<ServletDefinition> into a master list.

        We have a guarantee that Injector.getBindings() returns a map that preserves insertion order in entry-set iterators.

      • init

        public void init​(javax.servlet.ServletContext servletContext,
                         Injector injector)
                  throws javax.servlet.ServletException
        Throws:
        javax.servlet.ServletException
      • service

        public boolean service​(javax.servlet.ServletRequest request,
                               javax.servlet.ServletResponse response)
                        throws java.io.IOException,
                               javax.servlet.ServletException
        Throws:
        java.io.IOException
        javax.servlet.ServletException
      • destroy

        public void destroy()
      • getRequestDispatcher

        javax.servlet.RequestDispatcher getRequestDispatcher​(java.lang.String path)
        Returns:
        Returns a request dispatcher wrapped with a servlet mapped to the given path or null if no mapping was found.
      • wrapRequest

        static javax.servlet.http.HttpServletRequest wrapRequest​(javax.servlet.http.HttpServletRequest request,
                                                                 java.lang.String newUri)