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();