diff --git a/server/src/main/java/nl/andrewl/concord_server/ConcordServer.java b/server/src/main/java/nl/andrewl/concord_server/ConcordServer.java index ebb67c2..2e41e5b 100644 --- a/server/src/main/java/nl/andrewl/concord_server/ConcordServer.java +++ b/server/src/main/java/nl/andrewl/concord_server/ConcordServer.java @@ -27,10 +27,24 @@ import java.util.concurrent.TimeUnit; * The main server implementation, which handles accepting new clients. */ public class ConcordServer implements Runnable { + /** + * The path to this server's configuration file. + */ private static final Path CONFIG_FILE = Path.of("server-config.json"); + + /** + * The path to this server's database file. + */ private static final Path DATABASE_FILE = Path.of("concord-server.db"); + /** + * Running flag that's used to signal this server's thread to shutdown. + */ private volatile boolean running; + + /** + * This server's socket, used to accept new client connections. + */ private final ServerSocket serverSocket; /** diff --git a/server/src/main/java/nl/andrewl/concord_server/client/ClientManager.java b/server/src/main/java/nl/andrewl/concord_server/client/ClientManager.java index 18581e5..a83ca80 100644 --- a/server/src/main/java/nl/andrewl/concord_server/client/ClientManager.java +++ b/server/src/main/java/nl/andrewl/concord_server/client/ClientManager.java @@ -23,10 +23,29 @@ import java.util.stream.Collectors; * to a server. */ public class ClientManager { + /** + * A reference to the server that this client manager is for. + */ private final ConcordServer server; + + /** + * The set of connected clients, mapped by their id. + */ private final Map clients; + + /** + * The set of connected pending clients, mapped by their id. + */ private final Map pendingClients; + + /** + * The nitrite collection containing user data. + */ private final NitriteCollection userCollection; + + /** + * The service to use to authenticate incoming connections. + */ private final AuthenticationService authService; /**