Package org.apache.coyote

Examples of org.apache.coyote.AbstractProtocol


          @Override
          public void customize(Connector connector) {
            ProtocolHandler handler = connector.getProtocolHandler();
            if (handler instanceof AbstractProtocol) {
              AbstractProtocol protocol = (AbstractProtocol) handler;
              protocol.setMaxThreads(maxThreads);
              protocol.setConnectionTimeout(connectionTimeout);
              protocol.setMaxConnections(maxConnections);
            }
            connector.setProperty("acceptCount", acceptCount+"");
            connector.setProperty("maxKeepAliveRequests", maxKeepAliveRequests+"");
          }
        }
View Full Code Here


        factory.addConnectorCustomizers(new TomcatConnectorCustomizer() {
          @Override
          public void customize(Connector connector) {
            ProtocolHandler handler = connector.getProtocolHandler();
            if (handler instanceof AbstractProtocol) {
              @SuppressWarnings("rawtypes")
              AbstractProtocol protocol = (AbstractProtocol) handler;
              protocol.setMaxThreads(Tomcat.this.maxThreads);
            }
          }
        });
      }

      if (this.maxHttpHeaderSize > 0) {
        factory.addConnectorCustomizers(new TomcatConnectorCustomizer() {
          @Override
          public void customize(Connector connector) {
            ProtocolHandler handler = connector.getProtocolHandler();
            if (handler instanceof AbstractHttp11Protocol) {
              @SuppressWarnings("rawtypes")
              AbstractHttp11Protocol protocol = (AbstractHttp11Protocol) handler;
              protocol.setMaxHttpHeaderSize(Tomcat.this.maxHttpHeaderSize);
            }
          }
        });
      }
View Full Code Here

TOP

Related Classes of org.apache.coyote.AbstractProtocol

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.