deleted old code that is no longer needed

master
Alex 2022-03-19 00:15:19 +01:00
parent 1da0a02c78
commit 4481f7e14b
2 changed files with 4 additions and 33 deletions

View File

@ -4,12 +4,7 @@ import java.math.BigInteger;
import java.util.UUID;
public class Formatter {
/*
public static String formatUuid(String uuid) {
return uuid.replaceAll("-", "");
} */
public static String formatUuid(UUID uuid) {
return uuid.toString().replaceAll("-", "");
}

View File

@ -4,23 +4,14 @@ import earth.krakatao.Formatter;
import earth.krakatao.KraSocketClient;
import earth.krakatao.SocketClient;
import java.nio.charset.StandardCharsets;
import java.text.Format;
import java.text.Normalizer.Form;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.UUID;
import java.util.function.Consumer;
import lombok.Getter;
public class KraSocketClientProtocol {
//@Getter
//private final ArrayList<Integer> cmdIDs;
@Getter
private int currentCmdIDIndex;
//@Getter
//private final HashMap<Integer, Consumer<KraSocketClientProtocolMessage>> consumerHashMap;
@Getter
private final HashMap<Integer, KraSocketClientProtocolMessage> sendQueueMessages;
@ -28,9 +19,7 @@ public class KraSocketClientProtocol {
private final HashMap<Integer, KraSocketClientProtocolMessage> receivedQueueMessages;
public KraSocketClientProtocol() {
//this.cmdIDs = new ArrayList<>();
this.currentCmdIDIndex = 9;
//this.consumerHashMap = new HashMap<>();
this.sendQueueMessages = new HashMap<>();
this.receivedQueueMessages = new HashMap<>();
}
@ -91,8 +80,6 @@ public class KraSocketClientProtocol {
}
}
//this.cmdIDs.add(cmdID);
return raw;
}
@ -142,26 +129,15 @@ public class KraSocketClientProtocol {
public void removeMessageFromSendQueue(int cmdID) {
this.sendQueueMessages.remove(cmdID);
/*
Iterator<Integer> iterator = this.cmdIDs.iterator();
KraSocketClient.getLogger().info("before: " + this.cmdIDs);
while (iterator.hasNext()) {
if (iterator.next() == cmdID) {
iterator.remove();
}
}
KraSocketClient.getLogger().info("after: " + this.cmdIDs);
this.consumerHashMap.remove(cmdID); */
}
public void removeMessageFromReceivedQueue(int cmdID) {
this.receivedQueueMessages.remove(cmdID);
}
// This method is used to send a reply message to the backend that we have received the ack message.
/*
* This method is used to send a reply message to the backend that we have received the ack message.
*/
public void replyThatWeReceivedAckMessage(SocketClient socketClient,
KraSocketClientProtocol kraSocketClientProtocol, int cmdID, byte dest, UUID uuid,
int cmdNumber) {