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