public class HttpServletContainerImpl extends Object implements HttpServletContainer, HttpServletServicer, javax.servlet.FilterChain
HttpServletContainer
implementation.Constructor and Description |
---|
HttpServletContainerImpl(String servletName,
javax.servlet.http.HttpServlet servlet,
Map<String,String> initParameters,
OfficeServletContext officeServletContext,
Office office,
Clock clock,
Locale defaultLocale)
Initiate.
|
Modifier and Type | Method and Description |
---|---|
void |
doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response) |
String[] |
getServletMappings()
Obtains the mappings that are handled by this
HttpServletServicer . |
String |
getServletName()
Obtains the name of this
HttpServletServicer . |
void |
include(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Includes the servicing of contained
HttpServlet on the inputs. |
void |
include(OfficeServletContext context,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Includes the content from this
HttpServlet . |
void |
service(ServerHttpConnection connection,
HttpRequestState attributes,
HttpSession session,
HttpServletSecurity security,
TaskContext<?,?,?> taskContext,
ServicerMapping mapping)
Services the
HttpRequest of the ServerHttpConnection . |
public HttpServletContainerImpl(String servletName, javax.servlet.http.HttpServlet servlet, Map<String,String> initParameters, OfficeServletContext officeServletContext, Office office, Clock clock, Locale defaultLocale) throws javax.servlet.ServletException
servletName
- Name of the Servlet.servlet
- HttpServlet
.initParameters
- Init parameters for the ServletConfig
.officeServletContext
- OfficeServletContext
.office
- Office
.clock
- Clock
.defaultLocale
- Default Locale
.javax.servlet.ServletException
- If fails to initialise the HttpServlet
.public void service(ServerHttpConnection connection, HttpRequestState attributes, HttpSession session, HttpServletSecurity security, TaskContext<?,?,?> taskContext, ServicerMapping mapping) throws javax.servlet.ServletException, IOException
HttpServletContainer
HttpRequest
of the ServerHttpConnection
.service
in interface HttpServletContainer
connection
- ServerHttpConnection
containing the
HttpRequest
to service.attributes
- HttpRequestState
.session
- HttpSession
for the HttpRequest
.security
- HttpServletSecurity
. May be null
if
anonymous HttpRequest
.taskContext
- TaskContext
to allow access to OfficeFloor
capabilities.mapping
- ServicerMapping
that mapped the HttpRequest
to
the HttpServlet
. May be null
if not
mapped.javax.servlet.ServletException
- As per HttpServlet
API.IOException
- As per HttpServlet
API.public void include(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException
HttpServletContainer
HttpServlet
on the inputs.include
in interface HttpServletContainer
request
- HttpServletRequest
.response
- HttpServletResponse
.javax.servlet.ServletException
- As per HttpServlet
API.IOException
- As per HttpServlet
API.public String getServletName()
HttpServletServicer
Obtains the name of this HttpServletServicer
.
This will be used to find this HttpServletServicer
by name.
getServletName
in interface HttpServletServicer
HttpServletServicer
name.public String[] getServletMappings()
HttpServletServicer
Obtains the mappings that are handled by this HttpServletServicer
.
The mappings are of the form:
/some/path.extension
: for exact mapping (extension is
optional)/wild/card/*
: for path wild card mapping*.extension
: for extension mapping
This follows the Servlet
specification in regards to mappings.
getServletMappings
in interface HttpServletServicer
HttpServletServicer
.ServicerMapper
public void include(OfficeServletContext context, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException
HttpServletServicer
HttpServlet
.include
in interface HttpServletServicer
context
- OfficeServletContext
.request
- HttpServletRequest
.response
- HttpServletResponse
.javax.servlet.ServletException
- As per RequestDispatcher
.IOException
- As per RequestDispatcher
.public void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response) throws IOException, javax.servlet.ServletException
doFilter
in interface javax.servlet.FilterChain
IOException
javax.servlet.ServletException
Copyright © 2005–2016. All rights reserved.