package com.njcn.gather.detection.util.socket.communication.model;

import com.njcn.gather.detection.util.socket.communication.constants.SocketTransportConstants;

/**
 * Communication connection types retained by the transport foundation.
 * Stage 4-A keeps the session tags in a neutral constants class so the
 * Netty/WebSocket base layer no longer depends on detection helpers.
 *
 * @author hongawen
 * @date 2026/04/07
 */
public enum ConnectionType {

    SOURCE(SocketTransportConstants.SOURCE_SESSION_TAG, "程控源", false),
    DEVICE(SocketTransportConstants.DEVICE_SESSION_TAG, "被检设备", true),
    CONTRAST(SocketTransportConstants.CONTRAST_SESSION_TAG, "比对被检设备", true);

    private final String sessionTag;

    private final String displayName;

    private final boolean enableIdleMonitor;

    ConnectionType(String sessionTag, String displayName, boolean enableIdleMonitor) {
        this.sessionTag = sessionTag;
        this.displayName = displayName;
        this.enableIdleMonitor = enableIdleMonitor;
    }

    public String getSessionTag() {
        return sessionTag;
    }

    public String getDisplayName() {
        return displayName;
    }

    public boolean isEnableIdleMonitor() {
        return enableIdleMonitor;
    }
}
