Package com.google.inject.servlet
Class ManagedServletPipeline
- java.lang.Object
-
- com.google.inject.servlet.ManagedServletPipeline
-
class ManagedServletPipeline extends java.lang.ObjectA wrapping dispatcher for servlets, in much the same way asManagedFilterPipelineis for filters.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classManagedServletPipeline.RequestDispatcherRequestWrapper
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringREQUEST_DISPATCHER_REQUESTA 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 TypeLiteral<ServletDefinition>SERVLET_DEFSprivate ServletDefinition[]servletDefinitions
-
Constructor Summary
Constructors Constructor Description ManagedServletPipeline(Injector injector)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private ServletDefinition[]collectServletDefinitions(Injector injector)Introspects the injector and collects all instances of boundList<ServletDefinition>into a master list.voiddestroy()(package private) javax.servlet.RequestDispatchergetRequestDispatcher(java.lang.String path)(package private) booleanhasServletsMapped()voidinit(javax.servlet.ServletContext servletContext, Injector injector)booleanservice(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response)(package private) static javax.servlet.http.HttpServletRequestwrapRequest(javax.servlet.http.HttpServletRequest request, java.lang.String newUri)
-
-
-
Field Detail
-
servletDefinitions
private final ServletDefinition[] servletDefinitions
-
SERVLET_DEFS
private static final TypeLiteral<ServletDefinition> SERVLET_DEFS
-
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
-
-
Method Detail
-
hasServletsMapped
boolean hasServletsMapped()
-
collectServletDefinitions
private ServletDefinition[] collectServletDefinitions(Injector injector)
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 java.io.IOException, javax.servlet.ServletException- Throws:
java.io.IOExceptionjavax.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)
-
-