package com.pwt.netty.config;

import lombok.Getter;
import lombok.Setter;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

/**
 * @author linyun
 * @version V1.0
 * @Title: NettyConfig
 * @Description: netty配置类
 * @date 2022/11/01
 **/
@Component
@Getter
@Setter
@ConfigurationProperties(prefix = "netty")
@PropertySource(value = { "classpath:application-netty.yml" })
public class NettyConfig {

    /** netty host **/
    @Value("${SERVER_HOST}")
    private String SERVER_HOST;

    /** netty port **/
    @Value("${SERVER_PORT}")
    private int SERVER_PORT;

    /** 服务器读操作空闲时间(秒) **/
    @Value("${READER_IDLE_TIME_SECONDS}")
    private int READER_IDLE_TIME_SECONDS;

    /** 服务器写操作空闲时间(秒) **/
    @Value("${WRITER_IDLE_TIME_SECONDS}")
    private int WRITER_IDLE_TIME_SECONDS;

    /** 服务器全部操作空闲时间(秒) **/
    @Value("${ALL_IDLE_TIME_SECONDS}")
    private int ALL_IDLE_TIME_SECONDS;

    /** ip地址段 **/
    @Value("${IP_RANGE}")
    private String IP_RANGE;

}
