doum
2026-06-11 d9c657aa78cf0ebe31933a87e63ca92edd8a8da3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package com.doumee.core.haikang.isapi;
 
import com.doumee.dao.business.model.CollectionStation;
import lombok.Getter;
 
/**
 * 采集站 ISAPI 连接上下文
 */
@Getter
public class IsapiStationContext {
 
    private final String host;
    private final int port;
    private final boolean https;
    private final String username;
    private final String password;
 
    public IsapiStationContext(CollectionStation station) {
        this.host = station.getIp();
        this.port = station.getPort() != null ? station.getPort() : 80;
        this.https = station.getUseHttps() != null && station.getUseHttps() == 1;
        this.username = station.getUsername();
        this.password = station.getPassword();
    }
 
    public IsapiStationContext(String host, int port, boolean https, String username, String password) {
        this.host = host;
        this.port = port;
        this.https = https;
        this.username = username;
        this.password = password;
    }
}