From 86aa801b34055d1c1e3c76777c6e4e4ac07037a3 Mon Sep 17 00:00:00 2001 From: schrom01 Date: Thu, 14 Apr 2022 22:23:49 +0200 Subject: [PATCH] removed Enum State from ServerConnectionHandler.java because it's in ConnectionHandler.java now. --- .../zhaw/pm2/multichat/server/ServerConnectionHandler.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/server/src/main/java/ch/zhaw/pm2/multichat/server/ServerConnectionHandler.java b/server/src/main/java/ch/zhaw/pm2/multichat/server/ServerConnectionHandler.java index d3bd33f..c911b7b 100644 --- a/server/src/main/java/ch/zhaw/pm2/multichat/server/ServerConnectionHandler.java +++ b/server/src/main/java/ch/zhaw/pm2/multichat/server/ServerConnectionHandler.java @@ -2,6 +2,7 @@ package ch.zhaw.pm2.multichat.server; import ch.zhaw.pm2.multichat.protocol.ChatProtocolException; import ch.zhaw.pm2.multichat.protocol.ConnectionHandler; +import static ch.zhaw.pm2.multichat.protocol.ConnectionHandler.State.*; import ch.zhaw.pm2.multichat.protocol.NetworkHandler; import java.io.EOFException; @@ -15,7 +16,7 @@ import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.locks.Condition; import java.util.concurrent.locks.ReentrantLock; -import static ch.zhaw.pm2.multichat.server.ServerConnectionHandler.State.*; + public class ServerConnectionHandler extends ConnectionHandler implements Runnable{ private static final AtomicInteger connectionCounter = new AtomicInteger(0); @@ -34,10 +35,6 @@ public class ServerConnectionHandler extends ConnectionHandler implements Runnab startReceiving(); } - enum State { - NEW, CONNECTED, DISCONNECTED; - } - public ServerConnectionHandler(NetworkHandler.NetworkConnection connection, Map registry, ReentrantLock mutex, Condition nameComplete) { super();