protected void createNewSession(AsyncContext context, HttpBindBody body) throws IOException
    {
        try {
            final HttpConnection connection = new HttpConnection(body, context);

            SessionEventDispatcher.dispatchEvent( null, SessionEventDispatcher.EventType.pre_session_created, connection, context );

            final HttpSession session = sessionManager.createSession(body, connection);
            connection.setSession(session);

            if (HttpBindManager.LOG_HTTPBIND_ENABLED.getValue()) {
                Log.info("HTTP RECV({}): {}", session.getStreamID().getID(), body.asXML());
            }

            SessionEventDispatcher.dispatchEvent( connection.getSession(), SessionEventDispatcher.EventType.post_session_created, connection, context );
        }
        catch (UnauthorizedException | HttpBindException e) {
            // Server wasn't initialized yet.
            sendLegacyError(context, BoshBindingError.internalServerError, "Server has not finished initialization." );
        }
    }
Servlet which handles requests to the HTTP binding service. It determines if there is currently
an {@link HttpSession} related to the connection or if one needs to be created and then passes it
off to the {@link HttpBindManager} for processing of the client request and formulating of the
response.

@author Alexander Wenckus
xmppserver/src/main/java/org/jivesoftware/openfire/http/HttpBindServlet.java