Java 类org.eclipse.jetty.servlets.gzip.GzipHandler 实例源码

项目:spring-boot-concourse    文件:JettyEmbeddedServletContainerFactory.java   
@Override
public HandlerWrapper createGzipHandler(Compression compression) {
    GzipHandler gzipHandler = new GzipHandler();
    gzipHandler.setMinGzipSize(compression.getMinResponseSize());
    gzipHandler.addIncludedMimeTypes(compression.getMimeTypes());
    if (compression.getExcludedUserAgents() != null) {
        gzipHandler.setExcluded(new HashSet<String>(
                Arrays.asList(compression.getExcludedUserAgents())));
    }
    return gzipHandler;
}
项目:contestparser    文件:JettyEmbeddedServletContainerFactory.java   
@Override
public HandlerWrapper createGzipHandler(Compression compression) {
    GzipHandler gzipHandler = new GzipHandler();
    gzipHandler.setMinGzipSize(compression.getMinResponseSize());
    gzipHandler.setMimeTypes(
            new HashSet<String>(Arrays.asList(compression.getMimeTypes())));
    if (compression.getExcludedUserAgents() != null) {
        gzipHandler.setExcluded(new HashSet<String>(
                Arrays.asList(compression.getExcludedUserAgents())));
    }
    return gzipHandler;
}
项目:mondo-integration    文件:Customizer.java   
@Override
public Object customizeContext(Object context, Dictionary<String, ?> settings) {
    if (context instanceof ContextHandler) {
        final GzipHandler gzipHandler = new CustomLevelGzipHandler(Deflater.BEST_COMPRESSION);
        gzipHandler.setBufferSize(16384);
        final ContextHandler contextHandler = (ContextHandler)context;
        contextHandler.setHandler(gzipHandler);
    }
    return super.customizeContext(context, settings);
}
项目:mondo-hawk    文件:Customizer.java   
@Override
public Object customizeContext(Object context, Dictionary<String, ?> settings) {
    if (context instanceof ContextHandler) {
        final GzipHandler gzipHandler = new CustomLevelGzipHandler(Deflater.BEST_COMPRESSION);
        gzipHandler.setBufferSize(16384);
        final ContextHandler contextHandler = (ContextHandler)context;
        contextHandler.setHandler(gzipHandler);
    }
    return super.customizeContext(context, settings);
}
项目:mondo-collab-framework    文件:Customizer.java   
@Override
public Object customizeContext(Object context, Dictionary<String, ?> settings) {
    if (context instanceof ContextHandler) {
        final GzipHandler gzipHandler = new CustomLevelGzipHandler(Deflater.BEST_COMPRESSION);
        gzipHandler.setBufferSize(16384);
        final ContextHandler contextHandler = (ContextHandler)context;
        contextHandler.setHandler(gzipHandler);
    }
    return super.customizeContext(context, settings);
}
项目:gocd    文件:AssetsContextHandler.java   
public AssetsContextHandler(SystemEnvironment systemEnvironment) throws IOException {
    super(systemEnvironment.getWebappContextPath() + "/assets");
    this.systemEnvironment = systemEnvironment;
    handler = new AssetsHandler();

    GzipHandler gzipHandler = new GzipHandler();
    gzipHandler.addIncludedMimeTypes("text/html,text/plain,text/xml,application/xhtml+xml,text/css,application/javascript,image/svg+xml,application/vnd.go.cd.v1+json,application/json");
    gzipHandler.setHandler(handler);
    setHandler(gzipHandler);
}