|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.glassfish.grizzly.http.server.HttpHandler
org.glassfish.grizzly.servlet.ServletHandler
public class ServletHandler
HttpHandler implementation that provides an entry point for processing a Servlet request.
| Field Summary | |
|---|---|
protected ClassLoader |
classLoader
|
protected ExpectationHandler |
expectationHandler
|
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
|
| Constructor Summary | |
|---|---|
protected |
ServletHandler(ServletConfigImpl servletConfig)
|
| Method Summary | |
|---|---|
protected void |
configureClassLoader(String applicationPath)
Create a URLClassLoader which has the capability of
loading classes jar under an exploded war application. |
protected void |
configureServletEnv()
Configure the WebappContext
and ServletConfigImpl |
void |
customizeErrorPage(Response response,
String message,
int errorCode)
Customize the error page returned to the client. |
void |
destroy()
Destroy this Servlet and its associated ServletContextListener |
protected void |
doServletService(Request request,
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(Request request)
|
String |
getName()
|
ServletConfigImpl |
getServletConfig()
|
protected WebappContext |
getServletCtx()
|
javax.servlet.Servlet |
getServletInstance()
Return the Servlet instance used by this ServletHandler |
protected void |
loadServlet()
Load a Servlet instance. |
protected boolean |
sendAcknowledgment(Request request,
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(Request request,
Response response)
|
void |
setClassLoader(ClassLoader classLoader)
|
void |
setContextPath(String contextPath)
Programmatically set the context path of the Servlet. |
protected void |
setDispatcherHelper(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(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 |
void |
start()
|
| Methods inherited from class org.glassfish.grizzly.http.server.HttpHandler |
|---|
customizedErrorPage, doHandle, getRequestURIEncoding, isAllowCustomStatusMessage, isAllowEncodedSlash, setAllowCustomStatusMessage, setAllowEncodedSlash, setDecodeUrl, setRequestURIEncoding, setRequestURIEncoding, updatePaths |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected String servletClassName
protected Class<? extends javax.servlet.Servlet> servletClass
protected volatile javax.servlet.Servlet servletInstance
protected final Map<String,Object> properties
protected boolean initialize
ServletContext
protected ClassLoader classLoader
protected ExpectationHandler expectationHandler
| Constructor Detail |
|---|
protected ServletHandler(ServletConfigImpl servletConfig)
| Method Detail |
|---|
public void start()
start in class HttpHandler
protected void configureClassLoader(String applicationPath)
throws IOException
URLClassLoader which has the capability of
loading classes jar under an exploded war application.
applicationPath - Application class path.
IOException - I/O error.
protected boolean sendAcknowledgment(Request request,
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 HttpHandlerIOException
public void service(Request request,
Response response)
throws Exception
service in class HttpHandlerException
protected void doServletService(Request request,
Response response)
protected FilterChainInvoker getFilterChain(Request request)
protected void setPathData(Request from,
HttpServletRequestImpl to)
public void customizeErrorPage(Response response,
String message,
int errorCode)
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 ServletConfigImpl
javax.servlet.ServletException - Error while configuring
Servlet.public javax.servlet.Servlet getServletInstance()
Servlet instance used by this ServletHandler
Servlet instance.protected void setServletInstance(javax.servlet.Servlet servletInstance)
Servlet instance used by this ServletHandler
servletInstance - an instance of Servlet.protected void setServletClassName(String servletClassName)
protected void setServletClass(Class<? extends javax.servlet.Servlet> servletClass)
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()
ServletContextListener
destroy in class HttpHandlerprotected WebappContext getServletCtx()
public ClassLoader getClassLoader()
public void setClassLoader(ClassLoader classLoader)
public ServletConfigImpl getServletConfig()
public String getName()
getName in class 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(DispatcherHelper dispatcherHelper)
setDispatcherHelper in class HttpHandlerprotected void setFilterChainFactory(FilterChainFactory filterChainFactory)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||