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 an HttpSession related to the connection or if one needs to be created and then passes it off to the HttpBindManager for processing of the client request and formulating of the response.
Author:
Alexander Wenckus
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected static String
    createErrorBody(String type, String condition)
     
    protected void
    createNewSession(javax.servlet.AsyncContext context, HttpBindBody body)
     
    void
     
    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

    Methods inherited from class javax.servlet.GenericServlet

    getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • HttpBindServlet

      public HttpBindServlet()
  • Method Details

    • init

      public void init(javax.servlet.ServletConfig servletConfig) throws javax.servlet.ServletException
      Specified by:
      init in interface javax.servlet.Servlet
      Overrides:
      init in class javax.servlet.GenericServlet
      Throws:
      javax.servlet.ServletException
    • destroy

      public void destroy()
      Specified by:
      destroy in interface javax.servlet.Servlet
      Overrides:
      destroy in class javax.servlet.GenericServlet
    • service

      protected void service(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException
      Overrides:
      service in class javax.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 class javax.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 class javax.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
    • createErrorBody

      protected static String createErrorBody(String type, String condition)
    • getRemoteAddress

      protected static String getRemoteAddress(javax.servlet.AsyncContext context)