Package com.iizix.server.hub
package com.iizix.server.hub
- ClassDescriptionThe shared-DB identity of a hub,
HUB-DESIGN.mdsection 2.3: one row ofHUB.CLUSTERper hub holding a random UUID.The interim cluster key ofHUB-DESIGN.mdsection 2.2 (ruled H-8): a random 256-bit key in the file the definition's[hub] keynames, identical on every member, distributed by the operator as the Push key files are, and used as an HMAC challenge-response at registration until B-9 replaces it with the member's licence document.A refusal of the file: the message names the path and the reason, never the content.The hub definition in force on this server,HUB-DESIGN.mdsection 4.2: the file located by the system property "iizi.hub.definition" or, when it is absent, the environment variable "IIZI_HUB_DEFINITION" (the property wins), this server's member ID from "iizi.hub.member" or "IIZI_HUB_MEMBER" the same way, parsed byHubDefinitionFile, hashed for theREGISTERevent (HubDefinition.getDefinitionHash(), section 2.4) and watched for changes throughPushFileWatcher(ruling H-9: the watcher is used where it is; ruling S-5: aWatchService, never polling).The parser of the hub definition file,HUB-DESIGN.mdsection 4.2: UTF-8, unix-style ini, a byte-order mark ignored, LF or CRLF,#or;comments, case-insensitive section names, the sections[hub],[members]and[origins], each at most once.A refusal or a warning of the parser: theILoglevel, the line (0 for a whole-file message) and the message, which never carries a line's content or a value.A member of the[members]section.The result of a parse: the values, the defaults where the file sets nothing, and the diagnostics.The election policy of section 4.4 (ruling H-2).The member client ofHUB-DESIGN.mdsections 2 and 3 (B-7b): every member of a hub opens one WebSocket to the principal's/iizi/lb.wson the property framework and is admitted or refused.What the member reports at registration, read when theCHALLENGEarrives.The listener of the client's progress, for the server's log and for tests: called on the connection's thread.The state of the client.TheOriginallow-list ofHUB-DESIGN.mdsection 3.6 (R-17), applied byServerShellonce for both WebSocket upgrade paths - Jetty throughWSCreator, NIO throughWebSocketCommNIO- before any end point constructor is asked.An origin taken apart: lower-case scheme and host, the port as given or the scheme's default.The verdict on anOrigin.The hub channel between a member and the principal (HUB-DESIGN.mdsections 3.2 to 3.4, built by B-7b): one instance per member connection, the only child of the member's$devicecontainer, created by the member client (HubMemberClient) and mirrored on the principal by the property factory, which instantiates it because it is registered inbase-properties.xmlashubServer.The handler of the requests the peer sends: called ONCE per request, on the connection's thread.The listener of a request's outcome: called ONCE, on the connection's thread for a reply and on the timer's thread for a deadline.The side of the channel an instance is on.