diff options
author | syeyoung <42869671+cyoung06@users.noreply.github.com> | 2021-05-04 11:59:09 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-04 11:59:09 +0900 |
commit | 031d1803f0abe485dac3f6d07206cc8501421505 (patch) | |
tree | 1dea05d845ba0834ae8d117db9fa4980b1872402 /src/main/java/kr/syeyoung/dungeonsguide/stomp | |
parent | 6e3fae6c448c1443a1658f0803083fe95f6c2a52 (diff) | |
parent | 9d4c8a2f567f9cded9838ee57e1fe63d36ac8c8d (diff) | |
download | Skyblock-Dungeons-Guide-031d1803f0abe485dac3f6d07206cc8501421505.tar.gz Skyblock-Dungeons-Guide-031d1803f0abe485dac3f6d07206cc8501421505.tar.bz2 Skyblock-Dungeons-Guide-031d1803f0abe485dac3f6d07206cc8501421505.zip |
Merge pull request #3 from My-Name-Is-Jeff/master
Add copyright header and code cleanup
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/stomp')
8 files changed, 151 insertions, 7 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/stomp/CloseListener.java b/src/main/java/kr/syeyoung/dungeonsguide/stomp/CloseListener.java index a9b21cb7..fdb177a3 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/stomp/CloseListener.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/stomp/CloseListener.java @@ -1,3 +1,21 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + package kr.syeyoung.dungeonsguide.stomp; public interface CloseListener { diff --git a/src/main/java/kr/syeyoung/dungeonsguide/stomp/StompClient.java b/src/main/java/kr/syeyoung/dungeonsguide/stomp/StompClient.java index 7e8d89f6..1381a2c3 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/stomp/StompClient.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/stomp/StompClient.java @@ -1,3 +1,21 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + package kr.syeyoung.dungeonsguide.stomp; import lombok.Getter; @@ -35,7 +53,7 @@ public class StompClient extends WebSocketClient implements StompInterface { while(this.stompClientStatus == StompClientStatus.CONNECTING); System.out.println("fully connected"); } - private CloseListener closeListener; + private final CloseListener closeListener; @Getter private volatile StompClientStatus stompClientStatus = StompClientStatus.CONNECTING; @@ -103,8 +121,8 @@ public class StompClient extends WebSocketClient implements StompInterface { ex.printStackTrace(); } - private Map<Integer, StompSubscription> stompSubscriptionMap = new HashMap<Integer, StompSubscription>(); - private Map<Integer, StompPayload> receiptMap = new HashMap<Integer, StompPayload>(); + private final Map<Integer, StompSubscription> stompSubscriptionMap = new HashMap<Integer, StompSubscription>(); + private final Map<Integer, StompPayload> receiptMap = new HashMap<Integer, StompPayload>(); private int idIncrement = 0; diff --git a/src/main/java/kr/syeyoung/dungeonsguide/stomp/StompClientStatus.java b/src/main/java/kr/syeyoung/dungeonsguide/stomp/StompClientStatus.java index b3f5cbc2..ef3f907c 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/stomp/StompClientStatus.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/stomp/StompClientStatus.java @@ -1,5 +1,23 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + package kr.syeyoung.dungeonsguide.stomp; public enum StompClientStatus { - CONNECTING, CONNECTED, ERROR, DISCONNECTING, DISCONNECTED; + CONNECTING, CONNECTED, ERROR, DISCONNECTING, DISCONNECTED } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/stomp/StompHeader.java b/src/main/java/kr/syeyoung/dungeonsguide/stomp/StompHeader.java index 0e9c4311..f0b7a06b 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/stomp/StompHeader.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/stomp/StompHeader.java @@ -1,3 +1,21 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + package kr.syeyoung.dungeonsguide.stomp; import lombok.AllArgsConstructor; diff --git a/src/main/java/kr/syeyoung/dungeonsguide/stomp/StompInterface.java b/src/main/java/kr/syeyoung/dungeonsguide/stomp/StompInterface.java index e78f8ceb..8244fd58 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/stomp/StompInterface.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/stomp/StompInterface.java @@ -1,3 +1,21 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + package kr.syeyoung.dungeonsguide.stomp; public interface StompInterface { diff --git a/src/main/java/kr/syeyoung/dungeonsguide/stomp/StompMessageHandler.java b/src/main/java/kr/syeyoung/dungeonsguide/stomp/StompMessageHandler.java index 7b13c1fd..8b3efd77 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/stomp/StompMessageHandler.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/stomp/StompMessageHandler.java @@ -1,3 +1,21 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + package kr.syeyoung.dungeonsguide.stomp; public interface StompMessageHandler { diff --git a/src/main/java/kr/syeyoung/dungeonsguide/stomp/StompPayload.java b/src/main/java/kr/syeyoung/dungeonsguide/stomp/StompPayload.java index 19dd4ac1..1aeedb61 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/stomp/StompPayload.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/stomp/StompPayload.java @@ -1,3 +1,21 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + package kr.syeyoung.dungeonsguide.stomp; import kr.syeyoung.dungeonsguide.features.FeatureRegistry; @@ -35,7 +53,7 @@ public class StompPayload { if (payload != null) sb.append(payload); sb.append((char) 0); - System.out.println("Probably sending "+sb.toString()); + System.out.println("Probably sending "+ sb); return sb.toString(); } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/stomp/StompSubscription.java b/src/main/java/kr/syeyoung/dungeonsguide/stomp/StompSubscription.java index 5ecbeb06..790ba344 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/stomp/StompSubscription.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/stomp/StompSubscription.java @@ -1,3 +1,21 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + package kr.syeyoung.dungeonsguide.stomp; import lombok.AllArgsConstructor; @@ -14,10 +32,10 @@ public class StompSubscription { private AckMode ackMode; @AllArgsConstructor - public static enum AckMode { + public enum AckMode { AUTO("auto"), CLIENT("client"), CLIENT_INDIVIDUAL("client-individual"); @Getter - private String value; + private final String value; } } |