Class ServletTestRunner
- java.lang.Object
-
- jakarta.servlet.GenericServlet
-
- jakarta.servlet.http.HttpServlet
-
- org.jboss.arquillian.protocol.servlet5.runner.ServletTestRunner
-
- All Implemented Interfaces:
jakarta.servlet.Servlet,jakarta.servlet.ServletConfig,Serializable
public class ServletTestRunner extends jakarta.servlet.http.HttpServletServletTestRunnerThe server side executor for the Servlet protocol impl.
Supports multiple output modes ("outputmode"): - html - serializedObject
- Version:
- $Revision: $
- Author:
- Aslak Knutsen
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static StringCMD_NAME_EVENTstatic StringCMD_NAME_TESTstatic StringOUTPUT_MODE_HTMLstatic StringOUTPUT_MODE_SERIALIZEDstatic StringPARA_CLASS_NAMEstatic StringPARA_CMD_NAMEstatic StringPARA_METHOD_NAMEstatic StringPARA_OUTPUT_MODE
-
Constructor Summary
Constructors Constructor Description ServletTestRunner()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddestroy()protected voiddoGet(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)protected voiddoPost(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)protected voidexecute(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)voidexecuteEvent(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, String className, String methodName)voidexecuteTest(jakarta.servlet.http.HttpServletResponse response, String outputMode, String className, String methodName)static jakarta.servlet.ServletContextgetCurrentServletContext()voidinit()-
Methods inherited from class jakarta.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
-
-
-
-
Field Detail
-
PARA_METHOD_NAME
public static final String PARA_METHOD_NAME
- See Also:
- Constant Field Values
-
PARA_CLASS_NAME
public static final String PARA_CLASS_NAME
- See Also:
- Constant Field Values
-
PARA_OUTPUT_MODE
public static final String PARA_OUTPUT_MODE
- See Also:
- Constant Field Values
-
PARA_CMD_NAME
public static final String PARA_CMD_NAME
- See Also:
- Constant Field Values
-
OUTPUT_MODE_SERIALIZED
public static final String OUTPUT_MODE_SERIALIZED
- See Also:
- Constant Field Values
-
OUTPUT_MODE_HTML
public static final String OUTPUT_MODE_HTML
- See Also:
- Constant Field Values
-
CMD_NAME_TEST
public static final String CMD_NAME_TEST
- See Also:
- Constant Field Values
-
CMD_NAME_EVENT
public static final String CMD_NAME_EVENT
- See Also:
- Constant Field Values
-
-
Method Detail
-
getCurrentServletContext
public static jakarta.servlet.ServletContext getCurrentServletContext()
-
init
public void init() throws jakarta.servlet.ServletException- Overrides:
initin classjakarta.servlet.GenericServlet- Throws:
jakarta.servlet.ServletException
-
destroy
public void destroy()
- Specified by:
destroyin interfacejakarta.servlet.Servlet- Overrides:
destroyin classjakarta.servlet.GenericServlet
-
doPost
protected void doPost(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws jakarta.servlet.ServletException, IOException- Overrides:
doPostin classjakarta.servlet.http.HttpServlet- Throws:
jakarta.servlet.ServletExceptionIOException
-
doGet
protected void doGet(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws jakarta.servlet.ServletException, IOException- Overrides:
doGetin classjakarta.servlet.http.HttpServlet- Throws:
jakarta.servlet.ServletExceptionIOException
-
execute
protected void execute(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws jakarta.servlet.ServletException, IOException- Throws:
jakarta.servlet.ServletExceptionIOException
-
executeTest
public void executeTest(jakarta.servlet.http.HttpServletResponse response, String outputMode, String className, String methodName) throws ClassNotFoundException, IOException- Throws:
ClassNotFoundExceptionIOException
-
executeEvent
public void executeEvent(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, String className, String methodName) throws ClassNotFoundException, IOException- Throws:
ClassNotFoundExceptionIOException
-
-