All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.lontime.exthttp.configuration.ServerOption Maven / Gradle / Ivy

There is a newer version: 1.4.0
Show newest version
package com.github.lontime.exthttp.configuration;

import java.time.Duration;
import java.util.Arrays;
import java.util.List;
import java.util.Map;

import com.github.lontime.base.commonj.constants.Consts;
import com.github.lontime.exthttp.common.ConfigKey;
import lombok.Getter;
import lombok.Setter;
import reactor.netty.http.HttpProtocol;
import reactor.netty.http.server.ProxyProtocolSupportType;

/**
 * ServerOption.
 * @author lontime
 * @since 1.0
 */
@Getter
@Setter
public class ServerOption {

    private String name = Consts.DEFAULT_OBJECT_NAME;

    private Duration bindTimeout = Duration.ofSeconds(45);

    private Duration disposeTimeout = Duration.ofSeconds(3);

    private List protocols = Arrays.asList(HttpProtocol.HTTP11);

    private String host;

    private Integer port = 9800;

    private Boolean enableCompress;

    private Integer compressSize;

    private Duration idleTimeout;

    private Integer maxKeepAliveRequests;

    private Boolean noSSL;

    private Boolean warmup;

    private Boolean wiretapEnabled;

    private WiretapSpec wiretapSpec;

    private RequestDecoder requestDecoder;

    private CertificateSpec http11Certificate;

    private CertificateSpec http2Certificate;

    private Boolean accessLog;

    private Boolean forwarded;

    private Map channelOptions;

    private Map epollChannelOptions;

    private Map nioChannelOptions;

    private Map attrs;

    private ProxyProtocolSupportType proxyType;

    private Boolean autoStart = Boolean.TRUE;

    @Getter
    @Setter
    public static class RequestDecoder {
        private Integer maxChunkSize;
        private Integer maxHeaderSize;
        private Integer maxInitialLineLength;
        private Boolean validateHeaders;
        private Integer initialBufferSize;
        private Boolean allowDuplicateContentLengths;
        private Integer h2cMaxContentLength;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy