protected ServletContextHandler createBoshHandler()
    {
        final int options = ServletContextHandler.SESSIONS;
        final ServletContextHandler context = new ServletContextHandler( null, "/http-bind", options );

        context.setAttribute( InstanceManager.class.getName(), new SimpleInstanceManager() );

        // Generic configuration of the context.
        context.setAllowNullPathInfo( true );

        // Add the functionality-providers.
        context.addServlet( new ServletHolder( new HttpBindServlet() ), "/*" );

        // Add compression filter when needed.
        if (isHttpCompressionEnabled()) {
            final GzipHandler gzipHandler = new GzipHandler();
            gzipHandler.addIncludedPaths("/*");
            gzipHandler.addIncludedMethods(HttpMethod.POST.asString());
            context.insertHandler(gzipHandler);
        }

        // Add CSP headers for all HTTP responses (errors, etc.)
        context.addFilter(HttpBindContentSecurityPolicyFilter.class, "/*", null);

        return context;
    }
Creates a Jetty context handler that can be used to expose BOSH (HTTP-Bind) functionality.

Note that an invocation of this method will not register the handler (and thus make the related functionality
available to the end user). Instead, the created handler is returned by this method, and will need to be
registered with the embedded Jetty webserver by the caller.

@return A Jetty context handler (never null).
xmppserver/src/main/java/org/jivesoftware/openfire/http/HttpBindManager.java