yangys
2024-05-18 cc0bdfb33ef638dfafe3185c92c7076d815e1c9b
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
package com.qianwen.core.websocket.config;
 
import org.springframework.boot.context.properties.ConfigurationProperties;
 
@ConfigurationProperties(WebSocketProperties.PREFIX)
public class WebSocketProperties {
    public static final String PREFIX = "blade.websocket";
    private String path = "/ws/info";
    private String sockJsPath = "/ws_socketJs/info";
    private String allowOrigins = "*";
    private boolean supportPartialMessages = false;
    private boolean heartbeat = true;
    private boolean mapSession = true;
    private String messageDistributor = MessageDistributorTypeConstants.LOCAL;
 
    public void setPath(final String path) {
        this.path = path;
    }
 
    public void setSockJsPath(final String sockJsPath) {
        this.sockJsPath = sockJsPath;
    }
 
    public void setAllowOrigins(final String allowOrigins) {
        this.allowOrigins = allowOrigins;
    }
 
    public void setSupportPartialMessages(final boolean supportPartialMessages) {
        this.supportPartialMessages = supportPartialMessages;
    }
 
    public void setHeartbeat(final boolean heartbeat) {
        this.heartbeat = heartbeat;
    }
 
    public void setMapSession(final boolean mapSession) {
        this.mapSession = mapSession;
    }
 
    public void setMessageDistributor(final String messageDistributor) {
        this.messageDistributor = messageDistributor;
    }
 
    public boolean equals(final Object o) {
        if (o == this) {
            return true;
        }
        if (o instanceof WebSocketProperties) {
            WebSocketProperties other = (WebSocketProperties) o;
            if (other.canEqual(this) && isSupportPartialMessages() == other.isSupportPartialMessages() && isHeartbeat() == other.isHeartbeat() && isMapSession() == other.isMapSession()) {
                Object this$path = getPath();
                Object other$path = other.getPath();
                if (this$path == null) {
                    if (other$path != null) {
                        return false;
                    }
                } else if (!this$path.equals(other$path)) {
                    return false;
                }
                Object this$sockJsPath = getSockJsPath();
                Object other$sockJsPath = other.getSockJsPath();
                if (this$sockJsPath == null) {
                    if (other$sockJsPath != null) {
                        return false;
                    }
                } else if (!this$sockJsPath.equals(other$sockJsPath)) {
                    return false;
                }
                Object this$allowOrigins = getAllowOrigins();
                Object other$allowOrigins = other.getAllowOrigins();
                if (this$allowOrigins == null) {
                    if (other$allowOrigins != null) {
                        return false;
                    }
                } else if (!this$allowOrigins.equals(other$allowOrigins)) {
                    return false;
                }
                Object this$messageDistributor = getMessageDistributor();
                Object other$messageDistributor = other.getMessageDistributor();
                return this$messageDistributor == null ? other$messageDistributor == null : this$messageDistributor.equals(other$messageDistributor);
            }
            return false;
        }
        return false;
    }
 
    protected boolean canEqual(final Object other) {
        return other instanceof WebSocketProperties;
    }
 
    public int hashCode() {
        int result = (1 * 59) + (isSupportPartialMessages() ? 79 : 97);
        int result2 = (((result * 59) + (isHeartbeat() ? 79 : 97)) * 59) + (isMapSession() ? 79 : 97);
        Object $path = getPath();
        int result3 = (result2 * 59) + ($path == null ? 43 : $path.hashCode());
        Object $sockJsPath = getSockJsPath();
        int result4 = (result3 * 59) + ($sockJsPath == null ? 43 : $sockJsPath.hashCode());
        Object $allowOrigins = getAllowOrigins();
        int result5 = (result4 * 59) + ($allowOrigins == null ? 43 : $allowOrigins.hashCode());
        Object $messageDistributor = getMessageDistributor();
        return (result5 * 59) + ($messageDistributor == null ? 43 : $messageDistributor.hashCode());
    }
 
    public String toString() {
        return "WebSocketProperties(path=" + getPath() + ", sockJsPath=" + getSockJsPath() + ", allowOrigins=" + getAllowOrigins() + ", supportPartialMessages=" + isSupportPartialMessages() + ", heartbeat=" + isHeartbeat() + ", mapSession=" + isMapSession() + ", messageDistributor=" + getMessageDistributor() + ")";
    }
 
    public String getPath() {
        return this.path;
    }
 
    public String getSockJsPath() {
        return this.sockJsPath;
    }
 
    public String getAllowOrigins() {
        return this.allowOrigins;
    }
 
    public boolean isSupportPartialMessages() {
        return this.supportPartialMessages;
    }
 
    public boolean isHeartbeat() {
        return this.heartbeat;
    }
 
    public boolean isMapSession() {
        return this.mapSession;
    }
 
    public String getMessageDistributor() {
        return this.messageDistributor;
    }
}