Class WebSocketClient.ClientConfig

java.lang.Object
io.fluxzero.sdk.configuration.client.WebSocketClient.ClientConfig
Enclosing class:
WebSocketClient

public static class WebSocketClient.ClientConfig extends Object
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 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. Use toBuilder() 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 new ClientConfig with 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 new ClientConfig with a modified tracking config for the specified message type.