Package com.sun.grizzly.config.dom

Examples of com.sun.grizzly.config.dom.Http


        }
        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;
View Full Code Here


                final Protocols protocols = networkConfig.getProtocols();
                if (protocols.getProtocol().isEmpty()) {
                    createNewProtocols(httpService, protocols);
                }
                for (Protocol protocol : protocols.getProtocol()) {
                    final Http http = protocol.getHttp();
                    if (http != null) {
                        ConfigSupport.apply(new SingleConfigCode<Http>() {
                            @Override
                            public Object run(Http http) {
                                http.setVersion(httpProtocol.getVersion());
                                http.setDnsLookupEnabled(httpProtocol.getDnsLookupEnabled());
                                // these are both deprecated and end up with the
                                // value 'AttributeDeprecated' if they exist
                                http.setForcedResponseType(null);
                                http.setDefaultResponseType(null);
                                return null;
                            }

                        }, http);
                    }
View Full Code Here

        final KeepAlive keepAlive = httpService.getKeepAlive();
        if (keepAlive == null) {
            return;
        }
        for (Protocol protocol : config.getProtocols().getProtocol()) {
            final Http http = protocol.getHttp();
            if(http != null) {
                ConfigSupport.apply(new SingleConfigCode<Http>() {
                    @Override
                    public Object run(Http param) {
                        param.setMaxConnections(keepAlive.getMaxConnections());
View Full Code Here

                    return null;
                }
            }, listener);
        }
        for (Protocol protocol : config.getProtocols().getProtocol()) {
            final Http http = protocol.getHttp();
            if(http != null) {
                ConfigSupport.apply(new SingleConfigCode<Http>() {
                    @Override
                    public Object run(Http param) {
                        param.setHeaderBufferLengthBytes(request.getHeaderBufferLengthInBytes());
View Full Code Here

        }
    }

    private void updateHttp(NetworkConfig config, final ConnectionPool pool) throws TransactionFailure {
        for (Protocol protocol : config.getProtocols().getProtocol()) {
            final Http http = protocol.getHttp();
            if(http != null) {
                ConfigSupport.apply(new SingleConfigCode<Http>() {
                    @Override
                    public Object run(Http param) {
                        param.setSendBufferSizeBytes(pool.getSendBufferSizeInBytes());
View Full Code Here

        }
    }

    private void updateHttp(final String maxTransactionTimeout) throws TransactionFailure {
        for (Protocol protocol : currentConfig.getNetworkConfig().getProtocols().getProtocol()) {
            final Http http = protocol.getHttp();
            if (http != null) {
                ConfigSupport.apply(new SingleConfigCode<Http>() {
                    @Override
                    public Object run(Http param) {
                        if (param != null) {
View Full Code Here

                public Object run(Protocols param) throws TransactionFailure {
                    final Protocol protocol = param.createChild(Protocol.class);
                    protocol.setName(listenerName);
                    protocol.setSecurityEnabled(securityEnabled);
                    param.getProtocol().add(protocol);
                    final Http http = protocol.createChild(Http.class);
                    http.setDefaultVirtualServer(defaultVS);
                    http.setFileCache(http.createChild(FileCache.class));
                    protocol.setHttp(http);
                    return protocol;
                }
            }, networkConfig.getProtocols());
View Full Code Here

                public Object run(Protocols param) throws TransactionFailure {
                    final Protocol protocol = param.createChild(Protocol.class);
                    protocol.setName(listenerName);
                    protocol.setSecurityEnabled(securityEnabled);
                    param.getProtocol().add(protocol);
                    final Http http = protocol.createChild(Http.class);
                    http.setDefaultVirtualServer(defaultVS);
                    http.setFileCache(http.createChild(FileCache.class));
                    protocol.setHttp(http);
                    return protocol;
                }
            }, networkConfig.getProtocols());
View Full Code Here

TOP

Related Classes of com.sun.grizzly.config.dom.Http

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.