Message Flow

Overview

Once the WebSocket connection is established by ClientManager, message exchange and routing is handled by an internal pipeline composed of:

These components are automatically connected inside ClientManager when it is constructed or when connectToServer() is called.

Lifecycle and Wiring

Internally, when a ClientManager instance is created:

These proxies can be retrieved using:

chatClientManager.proxyForChannel("general");
chatClientManager.proxyForPrivateUser("user-id-1234");

Design Notes

- Models are populated only by the MessageBroker, based on server input.

- Proxies are created on-demand by ClientManager and cached internally.

- Each active chat window owns its own ClientManager, ensuring isolated message routing.