public class ServletHandler
extends org.glassfish.grizzly.http.server.HttpHandler
| Modifier and Type | Field and Description |
|---|---|
protected ClassLoader |
classLoader |
protected ExpectationHandler |
expectationHandler |
protected FilterChainFactory |
filterChainFactory |
protected boolean |
initialize
Initialize the
ServletContext |
protected Map<String,Object> |
properties
Holder for our configured properties.
|
protected Class<? extends javax.servlet.Servlet> |
servletClass |
protected String |
servletClassName |
protected javax.servlet.Servlet |
servletInstance |
| Modifier | Constructor and Description |
|---|---|
protected |
ServletHandler(ServletConfigImpl servletConfig) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
configureServletEnv()
Configure the
WebappContext
and ServletConfigImpl |
void |
customizeErrorPage(org.glassfish.grizzly.http.server.Response response,
String message,
int errorCode,
Throwable t)
Customize the error page returned to the client.
|
void |
destroy()
Destroy this Servlet and its associated
ServletContextListener |
protected void |
doServletService(org.glassfish.grizzly.http.server.Request request,
org.glassfish.grizzly.http.server.Response response) |
ClassLoader |
getClassLoader() |
String |
getContextPath()
Returns the portion of the request URI that indicates the context
of the request.
|
ExpectationHandler |
getExpectationHandler()
Get the
ExpectationHandler responsible for processing
Expect: header (for example "Expect: 100-Continue"). |
protected FilterChainInvoker |
getFilterChain(org.glassfish.grizzly.http.server.Request request) |
String |
getName() |
ServletConfigImpl |
getServletConfig() |
protected WebappContext |
getServletCtx() |
javax.servlet.Servlet |
getServletInstance()
Return the
Servlet instance used by this ServletHandler |
protected String |
getSessionCookieName()
Overrides default (JSESSIONID) session cookie name.
|
protected org.glassfish.grizzly.http.server.SessionManager |
getSessionManager(org.glassfish.grizzly.http.server.Request request) |
protected void |
loadServlet()
Load a
Servlet instance. |
protected boolean |
sendAcknowledgment(org.glassfish.grizzly.http.server.Request request,
org.glassfish.grizzly.http.server.Response response)
Override parent's
HttpHandler.sendAcknowledgment(org.glassfish.grizzly.http.server.Request, org.glassfish.grizzly.http.server.Response)
to let ExpectationHandler (if one is registered) process the expectation. |
void |
service(org.glassfish.grizzly.http.server.Request request,
org.glassfish.grizzly.http.server.Response response) |
void |
setClassLoader(ClassLoader classLoader) |
void |
setContextPath(String contextPath)
Programmatically set the context path of the Servlet.
|
protected void |
setDispatcherHelper(org.glassfish.grizzly.http.server.util.DispatcherHelper dispatcherHelper) |
void |
setExpectationHandler(ExpectationHandler expectationHandler)
Set the
ExpectationHandler responsible for processing
Expect: header (for example "Expect: 100-Continue"). |
protected void |
setFilterChainFactory(FilterChainFactory filterChainFactory) |
protected void |
setPathData(org.glassfish.grizzly.http.server.Request from,
HttpServletRequestImpl to) |
protected void |
setServletClass(Class<? extends javax.servlet.Servlet> servletClass) |
protected void |
setServletClassName(String servletClassName) |
protected void |
setServletInstance(javax.servlet.Servlet servletInstance)
Set the
Servlet instance used by this ServletHandler |
protected void |
setSessionManager(org.glassfish.grizzly.http.server.SessionManager sessionManager)
Set the
SessionManager instance used by this ServletHandler |
void |
start() |
getErrorPageGenerator, getRequestExecutorProvider, getRequestURIEncoding, isAllowCustomStatusMessage, isAllowEncodedSlash, setAllowCustomStatusMessage, setAllowEncodedSlash, setDecodeUrl, setRequestURIEncoding, setRequestURIEncoding, updatePathsprotected String servletClassName
protected Class<? extends javax.servlet.Servlet> servletClass
protected volatile javax.servlet.Servlet servletInstance
protected boolean initialize
ServletContextprotected ClassLoader classLoader
protected ExpectationHandler expectationHandler
protected FilterChainFactory filterChainFactory
protected ServletHandler(ServletConfigImpl servletConfig)
public void start()
start in class org.glassfish.grizzly.http.server.HttpHandlerprotected boolean sendAcknowledgment(org.glassfish.grizzly.http.server.Request request,
org.glassfish.grizzly.http.server.Response response)
throws IOException
HttpHandler.sendAcknowledgment(org.glassfish.grizzly.http.server.Request, org.glassfish.grizzly.http.server.Response)
to let ExpectationHandler (if one is registered) process the expectation.sendAcknowledgment in class org.glassfish.grizzly.http.server.HttpHandlerIOExceptionpublic void service(org.glassfish.grizzly.http.server.Request request,
org.glassfish.grizzly.http.server.Response response)
throws Exception
service in class org.glassfish.grizzly.http.server.HttpHandlerExceptionprotected void doServletService(org.glassfish.grizzly.http.server.Request request,
org.glassfish.grizzly.http.server.Response response)
protected FilterChainInvoker getFilterChain(org.glassfish.grizzly.http.server.Request request)
protected void setPathData(org.glassfish.grizzly.http.server.Request from,
HttpServletRequestImpl to)
public void customizeErrorPage(org.glassfish.grizzly.http.server.Response response,
String message,
int errorCode,
Throwable t)
response - the Responsemessage - the HTTP error messageerrorCode - the error code.protected void loadServlet()
throws javax.servlet.ServletException
Servlet instance.javax.servlet.ServletException - If failed to
Servlet.init(javax.servlet.ServletConfig).protected void configureServletEnv()
throws javax.servlet.ServletException
WebappContext
and ServletConfigImpljavax.servlet.ServletException - Error while configuring
Servlet.public javax.servlet.Servlet getServletInstance()
Servlet instance used by this ServletHandlerServlet instance.protected void setServletInstance(javax.servlet.Servlet servletInstance)
Servlet instance used by this ServletHandlerservletInstance - an instance of Servlet.protected void setServletClassName(String servletClassName)
protected void setServletClass(Class<? extends javax.servlet.Servlet> servletClass)
protected void setSessionManager(org.glassfish.grizzly.http.server.SessionManager sessionManager)
SessionManager instance used by this ServletHandlersessionManager - an implementation of SessionManager.public String getContextPath()
It is possible that a servlet container may match a context by
more than one context path. In such cases this method will return the
actual context path used by the request and it may differ from the
path returned by the
ServletContext.getContextPath() method.
The context path returned by
ServletContext.getContextPath()
should be considered as the prime or preferred context path of the
application.
String specifying the
portion of the request URI that indicates the context
of the requestServletContext.getContextPath()public void setContextPath(String contextPath)
contextPath - Context path.public void destroy()
ServletContextListenerdestroy in class org.glassfish.grizzly.http.server.HttpHandlerprotected WebappContext getServletCtx()
public ClassLoader getClassLoader()
public void setClassLoader(ClassLoader classLoader)
public ServletConfigImpl getServletConfig()
public String getName()
getName in class org.glassfish.grizzly.http.server.HttpHandlerpublic ExpectationHandler getExpectationHandler()
ExpectationHandler responsible for processing
Expect: header (for example "Expect: 100-Continue").ExpectationHandler responsible for processing
Expect: header (for example "Expect: 100-Continue").public void setExpectationHandler(ExpectationHandler expectationHandler)
ExpectationHandler responsible for processing
Expect: header (for example "Expect: 100-Continue").expectationHandler - the ExpectationHandler responsible
for processing Expect: header (for example "Expect: 100-Continue").protected void setDispatcherHelper(org.glassfish.grizzly.http.server.util.DispatcherHelper dispatcherHelper)
setDispatcherHelper in class org.glassfish.grizzly.http.server.HttpHandlerprotected void setFilterChainFactory(FilterChainFactory filterChainFactory)
protected String getSessionCookieName()
getSessionCookieName in class org.glassfish.grizzly.http.server.HttpHandlerprotected org.glassfish.grizzly.http.server.SessionManager getSessionManager(org.glassfish.grizzly.http.server.Request request)
getSessionManager in class org.glassfish.grizzly.http.server.HttpHandlerSessionManagerCopyright © 2019 Oracle Corporation. All Rights Reserved.