Package com.google.inject.servlet
Class ManagedServletPipeline
java.lang.Object
com.google.inject.servlet.ManagedServletPipeline
A wrapping dispatcher for servlets, in much the same way as
ManagedFilterPipeline
is for
filters.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static class
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
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.private static final TypeLiteral
<ServletDefinition> private final ServletDefinition[]
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate ServletDefinition[]
collectServletDefinitions
(Injector injector) Introspects the injector and collects all instances of boundList<ServletDefinition>
into a master list.void
destroy()
(package private) javax.servlet.RequestDispatcher
getRequestDispatcher
(String path) (package private) boolean
void
boolean
service
(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response) (package private) static javax.servlet.http.HttpServletRequest
wrapRequest
(javax.servlet.http.HttpServletRequest request, String newUri)
-
Field Details
-
servletDefinitions
-
SERVLET_DEFS
-
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:
-
-
Constructor Details
-
ManagedServletPipeline
-
-
Method Details
-
hasServletsMapped
boolean hasServletsMapped() -
collectServletDefinitions
Introspects the injector and collects all instances of boundList<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 IOException, javax.servlet.ServletException - Throws:
IOException
javax.servlet.ServletException
-
destroy
public void destroy() -
getRequestDispatcher
- 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, String newUri)
-