Package com.sun.enterprise.config.serverbeans

Examples of com.sun.enterprise.config.serverbeans.HttpFileCache


            }
        }, httpService);
    }

    private void migrateHttpFileCache(NetworkConfig config, HttpService httpService) throws TransactionFailure {
        final HttpFileCache httpFileCache = httpService.getHttpFileCache();
        if (httpFileCache == null) {
            return;
        }
        ConfigSupport.apply(new SingleConfigCode<NetworkConfig>() {
            @Override
            public Object run(NetworkConfig param) throws TransactionFailure {
                for (Protocol protocol : param.getProtocols().getProtocol()) {
                    final Http http = protocol.getHttp();
                    if (http != null) {
                        ConfigSupport.apply(new SingleConfigCode<Http>() {
                            @Override
                            public Object run(Http http) throws TransactionFailure {
                                final FileCache cache = http.createChild(FileCache.class);
                                http.setFileCache(cache);
                                cache.setEnabled(httpFileCache.getFileCachingEnabled());
                                cache.setMaxAgeSeconds(httpFileCache.getMaxAgeInSeconds());
                                cache.setMaxCacheSizeBytes(httpFileCache.getMediumFileSpaceInBytes());
                                cache.setMaxFilesCount(httpFileCache.getMaxFilesCount());
                                return null;
                            }
                        }, http);
                    }
                }
View Full Code Here

TOP

Related Classes of com.sun.enterprise.config.serverbeans.HttpFileCache

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.