Class HttpSocketServlet
java.lang.Object
jakarta.servlet.GenericServlet
jakarta.servlet.http.HttpServlet
com.aoapps.messaging.http.servlet.HttpSocketServlet
- All Implemented Interfaces:
Servlet,ServletConfig,Serializable
Server component for bi-directional messaging over HTTP.
This is a synchronous implementation compatible with older environments.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classServlet socket implementation.static classExpose to this package. -
Field Summary
FieldsFields inherited from class jakarta.servlet.http.HttpServlet
LEGACY_DO_HEAD -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedHttpSocketServlet(Encoder textInXhtmlEncoder) Creates a newHttpSocketServlet. -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()When the servlet is destroyed, any executors and all active sockets are also closed.protected final voiddoGet(HttpServletRequest request, HttpServletResponse response) Get requests must never be used.protected voiddoPost(HttpServletRequest request, HttpServletResponse response) protected final longgetLastModified(HttpServletRequest request) Last modified times must never be used.voidinit()Methods inherited from class jakarta.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, init, service, serviceMethods inherited from class jakarta.servlet.GenericServlet
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, log, log
-
Field Details
-
socketContext
-
-
Constructor Details
-
HttpSocketServlet
Creates a newHttpSocketServlet.
-
-
Method Details
-
init
- Overrides:
initin classGenericServlet- Throws:
ServletException
-
getLastModified
Last modified times must never be used.- Overrides:
getLastModifiedin classHttpServlet
-
doGet
protected final void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException Get requests must never be used.- Overrides:
doGetin classHttpServlet- Throws:
ServletExceptionIOException
-
doPost
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException - Overrides:
doPostin classHttpServlet- Throws:
ServletExceptionIOException
-
destroy
public void destroy()When the servlet is destroyed, any executors and all active sockets are also closed.- Specified by:
destroyin interfaceServlet- Overrides:
destroyin classGenericServlet
-
