Class WebSocketClient.ClientConfig
java.lang.Object
io.fluxzero.sdk.configuration.client.WebSocketClient.ClientConfig
- Enclosing class:
WebSocketClient
Configuration class for creating a
WebSocketClient.
This configuration defines identifiers, service URLs, compression settings, and session allocations for various
message types. It is immutable and can be modified fluently via its #toBuilder() method.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic WebSocketClient.ClientConfigfromProperties(io.fluxzero.common.application.PropertySource propertySource) Creates a configuration whose property-backed defaults are resolved from the supplied application-local source.@NonNull io.fluxzero.common.serialization.compression.CompressionAlgorithmReturns the most preferred compression algorithm supported by the client.withGatewaySessions(io.fluxzero.common.MessageType messageType, int count) Returns a newClientConfigwith a modified gateway session count for the specified message type.withTrackingConfig(io.fluxzero.common.MessageType messageType, WebSocketClient.TrackingClientConfig trackingConfig) Returns a newClientConfigwith a modified tracking config for the specified message type.
-
Constructor Details
-
ClientConfig
public ClientConfig()
-
-
Method Details
-
fromProperties
public static WebSocketClient.ClientConfig fromProperties(io.fluxzero.common.application.PropertySource propertySource) Creates a configuration whose property-backed defaults are resolved from the supplied application-local source. The source must contain the required Runtime base URL and application name. UsetoBuilder()to apply programmatic overrides to the result. -
getPreferredCompressionAlgorithm
@NonNull public @NonNull io.fluxzero.common.serialization.compression.CompressionAlgorithm getPreferredCompressionAlgorithm()Returns the most preferred compression algorithm supported by the client. -
withGatewaySessions
public WebSocketClient.ClientConfig withGatewaySessions(io.fluxzero.common.MessageType messageType, int count) Returns a newClientConfigwith a modified gateway session count for the specified message type. -
withTrackingConfig
public WebSocketClient.ClientConfig withTrackingConfig(io.fluxzero.common.MessageType messageType, WebSocketClient.TrackingClientConfig trackingConfig) Returns a newClientConfigwith a modified tracking config for the specified message type.
-