Class ServerLauncher
java.lang.Object
net.vincent.communidirect.server.ServerLauncher
Application entry point and dependency-injection root for the CommuniDirect server.
The constructor wires all components together:
SettingsManagerloads (or creates)~/.communidirect/config.toml.KeyStoreManagerloads the local Ed25519 identity and trusted peer keys.ServerSocket,ClientHandlerandAccessLogare instantiated and held as public fields so that sibling components can cross-reference them.
init() to complete binding and start accepting connections.-
Field Summary
FieldsModifier and TypeFieldDescriptionRecords inbound connection events to the configured access log file.Handles per-connection decoding and message persistence.Holds the local Ed25519 identity and all trusted peer public keys.TCP server socket abstraction used byClientHandlerto accept connections.Provides runtime configuration (port, IP, log paths). -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
serverSocket
TCP server socket abstraction used byClientHandlerto accept connections. -
clientHandler
Handles per-connection decoding and message persistence. -
accessLog
Records inbound connection events to the configured access log file. -
settings
Provides runtime configuration (port, IP, log paths). -
keyStore
Holds the local Ed25519 identity and all trusted peer public keys.
-
-
Constructor Details
-
ServerLauncher
public ServerLauncher()Constructs and wires all server components. Configuration and key loading happen synchronously during construction; any key-store failure is printed to stderr but does not abort startup.
-
-
Method Details
-
init
public void init()Initialises all components and blocks on the accept loop.Execution order:
- Configures the access log file path from settings.
- Binds the server socket to the configured IP and port.
- Starts the blocking
ClientHandleraccept loop.
-
main
-