Package org.jivesoftware.openfire.http
Class HttpBindServlet
- java.lang.Object
-
- javax.servlet.GenericServlet
-
- javax.servlet.http.HttpServlet
-
- org.jivesoftware.openfire.http.HttpBindServlet
-
- All Implemented Interfaces:
Serializable
,javax.servlet.Servlet
,javax.servlet.ServletConfig
public class HttpBindServlet extends javax.servlet.http.HttpServlet
Servlet which handles requests to the HTTP binding service. It determines if there is currently anHttpSession
related to the connection or if one needs to be created and then passes it off to theHttpBindManager
for processing of the client request and formulating of the response.- Author:
- Alexander Wenckus
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description HttpBindServlet()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static String
createErrorBody(String type, String condition)
protected void
createNewSession(javax.servlet.AsyncContext context, HttpBindBody body)
void
destroy()
protected void
doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
protected void
doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
protected static String
getRemoteAddress(javax.servlet.AsyncContext context)
void
init(javax.servlet.ServletConfig servletConfig)
protected void
processContent(javax.servlet.AsyncContext context, String content)
static void
respond(HttpSession session, javax.servlet.AsyncContext context, String content, boolean async)
protected static void
sendLegacyError(javax.servlet.AsyncContext context, BoshBindingError error)
protected static void
sendLegacyError(javax.servlet.AsyncContext context, BoshBindingError error, String message)
protected void
service(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
-
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service
-
-
-
-
Method Detail
-
init
public void init(javax.servlet.ServletConfig servletConfig) throws javax.servlet.ServletException
- Specified by:
init
in interfacejavax.servlet.Servlet
- Overrides:
init
in classjavax.servlet.GenericServlet
- Throws:
javax.servlet.ServletException
-
destroy
public void destroy()
- Specified by:
destroy
in interfacejavax.servlet.Servlet
- Overrides:
destroy
in classjavax.servlet.GenericServlet
-
service
protected void service(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException
- Overrides:
service
in classjavax.servlet.http.HttpServlet
- Throws:
javax.servlet.ServletException
IOException
-
doGet
protected void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException
- Overrides:
doGet
in classjavax.servlet.http.HttpServlet
- Throws:
javax.servlet.ServletException
IOException
-
doPost
protected void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException
- Overrides:
doPost
in classjavax.servlet.http.HttpServlet
- Throws:
javax.servlet.ServletException
IOException
-
processContent
protected void processContent(javax.servlet.AsyncContext context, String content) throws IOException
- Throws:
IOException
-
createNewSession
protected void createNewSession(javax.servlet.AsyncContext context, HttpBindBody body) throws IOException
- Throws:
IOException
-
respond
public static void respond(HttpSession session, javax.servlet.AsyncContext context, String content, boolean async) throws IOException
- Throws:
IOException
-
sendLegacyError
protected static void sendLegacyError(javax.servlet.AsyncContext context, BoshBindingError error, String message) throws IOException
- Throws:
IOException
-
sendLegacyError
protected static void sendLegacyError(javax.servlet.AsyncContext context, BoshBindingError error) throws IOException
- Throws:
IOException
-
getRemoteAddress
protected static String getRemoteAddress(javax.servlet.AsyncContext context)
-
-