Пример #1
0
    void customizeUndertow(
        final ServerProperties serverProperties, UndertowEmbeddedServletContainerFactory factory) {
      if (this.bufferSize != null) {
        factory.setBufferSize(this.bufferSize);
      }
      if (this.buffersPerRegion != null) {
        factory.setBuffersPerRegion(this.buffersPerRegion);
      }
      if (this.ioThreads != null) {
        factory.setIoThreads(this.ioThreads);
      }
      if (this.workerThreads != null) {
        factory.setWorkerThreads(this.workerThreads);
      }
      if (this.directBuffers != null) {
        factory.setDirectBuffers(this.directBuffers);
      }
      if (this.accesslog.dir != null) {
        factory.setAccessLogDirectory(this.accesslog.dir);
      }
      if (this.accesslog.pattern != null) {
        factory.setAccessLogPattern(this.accesslog.pattern);
      }
      if (this.accesslog.prefix != null) {
        factory.setAccessLogPrefix(this.accesslog.prefix);
      }
      if (this.accesslog.suffix != null) {
        factory.setAccessLogSuffix(this.accesslog.suffix);
      }
      if (this.accesslog.enabled != null) {
        factory.setAccessLogEnabled(this.accesslog.enabled);
      }
      factory.setUseForwardHeaders(serverProperties.getOrDeduceUseForwardHeaders());
      if (serverProperties.getMaxHttpHeaderSize() > 0) {
        customizeMaxHttpHeaderSize(factory, serverProperties.getMaxHttpHeaderSize());
      }
      if (serverProperties.getMaxHttpPostSize() > 0) {
        customizeMaxHttpPostSize(factory, serverProperties.getMaxHttpPostSize());
      }

      if (serverProperties.getConnectionTimeout() != null) {
        customizeConnectionTimeout(factory, serverProperties.getConnectionTimeout());
      }
    }