|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.officefloor.frame.util.AbstractSingleTask<HttpServletTask,HttpServletTask.DependencyKeys,None>
net.officefloor.plugin.servlet.container.source.HttpServletTask
public class HttpServletTask
Task for a HttpServlet to service a HttpRequest.
| Nested Class Summary | |
|---|---|
static class |
HttpServletTask.DependencyKeys
Keys for the dependencies. |
| Field Summary | |
|---|---|
static String |
PROPERTY_PREFIX_INIT_PARAMETER
Prefix of property for an initialisation parameter. |
static String |
PROPERTY_SERVLET_MAPPINGS
Name of property to obtain mappings to the HttpServlet. |
static String |
TASK_NAME
Name of the servicing Task for the Servlet. |
| Constructor Summary | |
|---|---|
HttpServletTask(String servletName,
javax.servlet.http.HttpServlet servlet,
Map<String,String> initParameters,
String... servletMappings)
Initiate. |
|
| Method Summary | |
|---|---|
Object |
doTask(TaskContext<HttpServletTask,HttpServletTask.DependencyKeys,None> context)
|
String[] |
getServletMappings()
Obtains the mappings that are handled by this HttpServletServicer. |
String |
getServletName()
Obtains the name of this HttpServletServicer. |
void |
include(OfficeServletContext context,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Includes the content from this HttpServlet. |
void |
setOffice(Office office)
|
static void |
sourceWork(WorkTypeBuilder<HttpServletTask> workTypeBuilder,
WorkSourceContext context,
String servletName,
javax.servlet.http.HttpServlet servlet,
String... servletMappings)
Sources the Work for a HttpServletTask. |
| Methods inherited from class net.officefloor.frame.util.AbstractSingleTask |
|---|
createTask, createWork, getRecycleManagedObjectParameter, registerAsRecycleTask, registerTask, registerTask, registerTask, registerWork |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface net.officefloor.frame.api.build.WorkFactory |
|---|
createWork |
| Field Detail |
|---|
public static final String PROPERTY_PREFIX_INIT_PARAMETER
public static final String PROPERTY_SERVLET_MAPPINGS
HttpServlet. Mappings
are comma (,) separated.
public static final String TASK_NAME
Task for the Servlet.
| Constructor Detail |
|---|
public HttpServletTask(String servletName,
javax.servlet.http.HttpServlet servlet,
Map<String,String> initParameters,
String... servletMappings)
servletName - Name of the HttpServlet.servlet - HttpServlet to service the HttpRequest.initParameters - Initialisation parameters.servletMappings - Mappings to the HttpServlet.| Method Detail |
|---|
public static void sourceWork(WorkTypeBuilder<HttpServletTask> workTypeBuilder,
WorkSourceContext context,
String servletName,
javax.servlet.http.HttpServlet servlet,
String... servletMappings)
Work for a HttpServletTask.
workTypeBuilder - WorkTypeBuilder.context - WorkSourceContext.servletName - Servlet name.servlet - HttpServlet.servletMappings - Mappings to the HttpServlet.
public void setOffice(Office office)
throws Exception
setOffice in interface OfficeAwareWorkFactory<HttpServletTask>Exception
public Object doTask(TaskContext<HttpServletTask,HttpServletTask.DependencyKeys,None> context)
throws javax.servlet.ServletException,
IOException
doTask in interface Task<HttpServletTask,HttpServletTask.DependencyKeys,None>javax.servlet.ServletException
IOExceptionpublic String getServletName()
HttpServletServicer
Obtains the name of this HttpServletServicer.
This will be used to find this HttpServletServicer by name.
getServletName in interface HttpServletServicerHttpServletServicer 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 HttpServletServicerHttpServletServicer.ServicerMapper
public void include(OfficeServletContext context,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
IOException
HttpServletServicerHttpServlet.
include in interface HttpServletServicercontext - OfficeServletContext.request - HttpServletRequest.response - HttpServletResponse.
javax.servlet.ServletException - As per RequestDispatcher.
IOException - As per RequestDispatcher.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||