Search in sources :

Example 1 with GzipHandler

use of org.apache.hbase.thirdparty.org.eclipse.jetty.server.handler.gzip.GzipHandler in project hbase by apache.

the class HttpServer method buildGzipHandler.

/**
 * Construct and configure an instance of {@link GzipHandler}. With complex
 * multi-{@link WebAppContext} configurations, it's easiest to apply this handler directly to the
 * instance of {@link Server} near the end of its configuration, something like
 * <pre>
 *    Server server = new Server();
 *    //...
 *    server.setHandler(buildGzipHandler(server.getHandler()));
 *    server.start();
 * </pre>
 */
public static GzipHandler buildGzipHandler(final Handler wrapped) {
    final GzipHandler gzipHandler = new GzipHandler();
    gzipHandler.setHandler(wrapped);
    return gzipHandler;
}
Also used : GzipHandler(org.apache.hbase.thirdparty.org.eclipse.jetty.server.handler.gzip.GzipHandler)

Aggregations

GzipHandler (org.apache.hbase.thirdparty.org.eclipse.jetty.server.handler.gzip.GzipHandler)1