Examples of Http


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

        }
        // Add to the <network-config>
        try {
            ConfigSupport.apply(new SingleConfigCode<Protocol>() {
                public Object run(Protocol param) throws TransactionFailure {
                    Http http = param.createChild(Http.class);
                    final FileCache cache = http.createChild(FileCache.class);
                    cache.setEnabled("false");
                    http.setFileCache(cache);
                    http.setDefaultVirtualServer(defaultVirtualServer);
                    http.setDnsLookupEnabled(dnsLookupEnabled == null ? null : dnsLookupEnabled.toString());
                    http.setMaxConnections(maxConnections);
                    http.setRequestTimeoutSeconds(requestTimeoutSeconds);
                    http.setTimeoutSeconds(timeoutSeconds);
                    http.setXpoweredBy(xPoweredBy == null ? null : xPoweredBy.toString());
                    http.setServerName(serverName);
                    param.setHttp(http);
                    return http;
                }
            }, protocol);
        } catch (TransactionFailure e) {
View Full Code Here

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

                continue;
            }
            Protocols ps = config.getNetworkConfig().getProtocols();
            if (ps != null) {
                for (Protocol p : ps.getProtocol()) {
                    Http h = p.getHttp();
                    if (h != null
                            && "__asadmin".equals(h.getDefaultVirtualServer())) {
                        try {
                            ConfigSupport.apply(new HttpConfigCode(), h);
                        } catch (TransactionFailure tf) {
                            LogRecord lr = new LogRecord(Level.SEVERE,
                                    "Could not upgrade http element for admin console: "+ tf);
View Full Code Here

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

            adminProtocol = (Protocol) ConfigSupport.apply(new SingleConfigCode<Protocols>() {
                public Object run(Protocols param) throws TransactionFailure {
                    final Protocol protocol = param.createChild(Protocol.class);
                    param.getProtocol().add(protocol);
                    protocol.setName(ASADMIN_LISTENER);
                    Http http = protocol.createChild(Http.class);
                    http.setFileCache(http.createChild(FileCache.class));
                    protocol.setHttp(http);
                    http.setDefaultVirtualServer(ASADMIN_VIRTUAL_SERVER);
                    http.setMaxConnections("250");
                    return protocol;
                }
            }, protocols);
        }
        for (NetworkListener listener : adminProtocol.findNetworkListeners()) {
View Full Code Here

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

        normalizeThreadPools();
        getNetworkConfig();
    }

    private void createHttp(Protocol protocol, HttpListener listener) throws TransactionFailure {
        Http http = protocol.createChild(Http.class);
        http.setFileCache(http.createChild(FileCache.class));
        protocol.setHttp(http);
        http.setDefaultVirtualServer(listener.getDefaultVirtualServer());
        http.setServerName(listener.getServerName());
        http.setRedirectPort(listener.getRedirectPort());
        http.setXpoweredBy(listener.getXpoweredBy());
    }
View Full Code Here

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

            public Object run(Protocols param) throws TransactionFailure {
                for (final HttpListener httpListener : httpService.getHttpListener()) {
                    final Protocol protocol = param.createChild(Protocol.class);
                    param.getProtocol().add(protocol);
                    protocol.setName(httpListener.getId());
                    final Http http = protocol.createChild(Http.class);
                    http.setFileCache(http.createChild(FileCache.class));
                    http.setDefaultVirtualServer(
                        httpListener.getId().equals(ASADMIN_LISTENER) ? ASADMIN_VIRTUAL_SERVER : "server");
                    protocol.setHttp(http);
                }
                return null;
            }
View Full Code Here

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

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

                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

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

        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

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

                    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

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

        }
    }

    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
TOP
Copyright © 2018 www.massapi.com. 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.