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.HttpServletServlet which handles requests to the HTTP binding service. It determines if there is currently anHttpSessionrelated to the connection or if one needs to be created and then passes it off to theHttpBindManagerfor 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 StringcreateErrorBody(String type, String condition)protected voidcreateNewSession(javax.servlet.AsyncContext context, HttpBindBody body)voiddestroy()protected voiddoGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)protected voiddoPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)protected static StringgetRemoteAddress(javax.servlet.AsyncContext context)voidinit(javax.servlet.ServletConfig servletConfig)protected voidprocessContent(javax.servlet.AsyncContext context, String content)static voidrespond(HttpSession session, javax.servlet.AsyncContext context, String content, boolean async)protected static voidsendLegacyError(javax.servlet.AsyncContext context, BoshBindingError error)protected static voidsendLegacyError(javax.servlet.AsyncContext context, BoshBindingError error, String message)protected voidservice(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:
initin interfacejavax.servlet.Servlet- Overrides:
initin classjavax.servlet.GenericServlet- Throws:
javax.servlet.ServletException
-
destroy
public void destroy()
- Specified by:
destroyin interfacejavax.servlet.Servlet- Overrides:
destroyin classjavax.servlet.GenericServlet
-
service
protected void service(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException- Overrides:
servicein classjavax.servlet.http.HttpServlet- Throws:
javax.servlet.ServletExceptionIOException
-
doGet
protected void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException- Overrides:
doGetin classjavax.servlet.http.HttpServlet- Throws:
javax.servlet.ServletExceptionIOException
-
doPost
protected void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException- Overrides:
doPostin classjavax.servlet.http.HttpServlet- Throws:
javax.servlet.ServletExceptionIOException
-
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)
-
-