Package org.springframework.boot.context.embedded.tomcat

Examples of org.springframework.boot.context.embedded.tomcat.TomcatConnectorCustomizer


  }

  private void customizeTomcatConnector(TomcatEmbeddedServletContainerFactory factory) {

    factory.addConnectorCustomizers(
        new TomcatConnectorCustomizer() {

          @Override
          public void customize(Connector connector) {
            ProtocolHandler handler = connector.getProtocolHandler();
            if (handler instanceof AbstractProtocol) {
View Full Code Here


        // the keystore needs to be in the filesystem and not just on the classpath
        // this ensures that it gets unpacked from the jar/war
        final File keyStore = com.groupon.odo.proxylib.Utils.copyResourceToLocalFile("tomcat.ks", "tomcat.ks");

        // Add HTTPS customization to connector
        factory.addConnectorCustomizers(new TomcatConnectorCustomizer() {
            @Override
            public void customize(Connector connector) {
                MockService config = MockService.getInstance();
                connector.setPort(config.getPort());
                connector.setSecure(true);
View Full Code Here

      public void customize(
          ConfigurableEmbeddedServletContainer container) {

        TomcatEmbeddedServletContainerFactory tomcat = (TomcatEmbeddedServletContainerFactory) container;

        tomcat.addConnectorCustomizers(new TomcatConnectorCustomizer() {

          @Override
          public void customize(Connector connector) {

            connector.setPort(httpsPort);
View Full Code Here

        valve.setPortHeader(getPortHeader());
        factory.addContextValves(valve);
      }

      if (this.maxThreads > 0) {
        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")
View Full Code Here

TOP

Related Classes of org.springframework.boot.context.embedded.tomcat.TomcatConnectorCustomizer

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.