This commit is contained in:
schrom01 2022-04-14 22:12:35 +02:00
parent d8dbd93c15
commit 2277fee73a
2 changed files with 3 additions and 6 deletions

View File

@ -17,10 +17,6 @@ public abstract class ConnectionHandler {
NEW, CONFIRM_CONNECT, CONNECTED, CONFIRM_DISCONNECT, DISCONNECTED; NEW, CONFIRM_CONNECT, CONNECTED, CONFIRM_DISCONNECT, DISCONNECTED;
} }
public ConnectionHandler(NetworkHandler.NetworkConnection<String> connection) {
this.connection = connection;
}
public static String getDataTypeConnect() { public static String getDataTypeConnect() {
return DATA_TYPE_CONNECT; return DATA_TYPE_CONNECT;
} }
@ -45,7 +41,7 @@ public abstract class ConnectionHandler {
return connection; return connection;
} }
protected void setConnection() { protected void setConnection(NetworkHandler.NetworkConnection<String> connection) {
this.connection = connection; this.connection = connection;
} }
} }

View File

@ -40,7 +40,8 @@ public class ServerConnectionHandler extends ConnectionHandler implements Runnab
public ServerConnectionHandler(NetworkHandler.NetworkConnection<String> connection, public ServerConnectionHandler(NetworkHandler.NetworkConnection<String> connection,
Map<String,ServerConnectionHandler> registry, ReentrantLock mutex, Condition nameComplete) { Map<String,ServerConnectionHandler> registry, ReentrantLock mutex, Condition nameComplete) {
super(connection); super();
setConnection(connection);
Objects.requireNonNull(connection, "Connection must not be null"); Objects.requireNonNull(connection, "Connection must not be null");
Objects.requireNonNull(registry, "Registry must not be null"); Objects.requireNonNull(registry, "Registry must not be null");
this.connectionRegistry = registry; this.connectionRegistry = registry;