|
30 | 30 | public class MqttWebSocketConfigImpl implements MqttWebSocketConfig {
|
31 | 31 |
|
32 | 32 | static final @NotNull MqttWebSocketConfigImpl DEFAULT =
|
33 |
| - new MqttWebSocketConfigImpl(DEFAULT_SERVER_PATH, DEFAULT_QUERY_STRING, DEFAULT_MQTT_SUBPROTOCOL, |
34 |
| - DEFAULT_HANDSHAKE_TIMEOUT_MS); |
| 33 | + new MqttWebSocketConfigImpl(DEFAULT_PATH, DEFAULT_QUERY, DEFAULT_SUBPROTOCOL, DEFAULT_HANDSHAKE_TIMEOUT_MS); |
35 | 34 |
|
36 |
| - private final @NotNull String serverPath; |
37 |
| - private final @NotNull String queryString; |
| 35 | + private final @NotNull String path; |
| 36 | + private final @NotNull String query; |
38 | 37 | private final @NotNull String subprotocol;
|
39 | 38 | private final @Range(from = 0, to = Integer.MAX_VALUE) int handshakeTimeoutMs;
|
40 | 39 |
|
41 | 40 | MqttWebSocketConfigImpl(
|
42 |
| - final @NotNull String serverPath, |
43 |
| - final @NotNull String queryString, |
| 41 | + final @NotNull String path, |
| 42 | + final @NotNull String query, |
44 | 43 | final @NotNull String subprotocol,
|
45 | 44 | final @Range(from = 0, to = Integer.MAX_VALUE) int handshakeTimeoutMs) {
|
46 | 45 |
|
47 |
| - this.serverPath = serverPath; |
48 |
| - this.queryString = queryString; |
| 46 | + this.path = path; |
| 47 | + this.query = query; |
49 | 48 | this.subprotocol = subprotocol;
|
50 | 49 | this.handshakeTimeoutMs = handshakeTimeoutMs;
|
51 | 50 | }
|
52 | 51 |
|
53 | 52 | @Override
|
54 |
| - public @NotNull String getServerPath() { |
55 |
| - return serverPath; |
| 53 | + public @NotNull String getPath() { |
| 54 | + return path; |
56 | 55 | }
|
57 | 56 |
|
58 | 57 | @Override
|
59 |
| - public @NotNull String getQueryString() { |
60 |
| - return queryString; |
| 58 | + public @NotNull String getQuery() { |
| 59 | + return query; |
61 | 60 | }
|
62 | 61 |
|
63 | 62 | @Override
|
@@ -85,14 +84,14 @@ public boolean equals(final @Nullable Object o) {
|
85 | 84 | }
|
86 | 85 | final MqttWebSocketConfigImpl that = (MqttWebSocketConfigImpl) o;
|
87 | 86 |
|
88 |
| - return serverPath.equals(that.serverPath) && queryString.equals(that.queryString) && |
89 |
| - subprotocol.equals(that.subprotocol) && (handshakeTimeoutMs == that.handshakeTimeoutMs); |
| 87 | + return path.equals(that.path) && query.equals(that.query) && subprotocol.equals(that.subprotocol) && |
| 88 | + (handshakeTimeoutMs == that.handshakeTimeoutMs); |
90 | 89 | }
|
91 | 90 |
|
92 | 91 | @Override
|
93 | 92 | public int hashCode() {
|
94 |
| - int result = serverPath.hashCode(); |
95 |
| - result = 31 * result + queryString.hashCode(); |
| 93 | + int result = path.hashCode(); |
| 94 | + result = 31 * result + query.hashCode(); |
96 | 95 | result = 31 * result + subprotocol.hashCode();
|
97 | 96 | result = 31 * result + Integer.hashCode(handshakeTimeoutMs);
|
98 | 97 | return result;
|
|
0 commit comments