Record Class ProxyServerConfig

java.lang.Object
java.lang.Record
io.fluxzero.proxy.ProxyServerConfig
Record Components:
port - port to bind, or 0 to select a free port
runtimeBaseUrl - Fluxzero Runtime websocket base URL
applicationName - proxy client name
namespace - optional namespace/project id
metricsEnabled - whether the proxy client publishes metrics
supportedCompressionAlgorithms - optional compression algorithm preference
healthEndpoint - HTTP health endpoint path
gracefulShutdown - whether Jetty uses the proxy's graceful shutdown timeout

public record ProxyServerConfig(int port, String runtimeBaseUrl, String applicationName, String namespace, boolean metricsEnabled, List<CompressionAlgorithm> supportedCompressionAlgorithms, String healthEndpoint, boolean gracefulShutdown) extends Record
Configuration for embedding the Fluxzero proxy without relying on process-global properties.
  • Field Details

  • Constructor Details

    • ProxyServerConfig

      public ProxyServerConfig(int port, String runtimeBaseUrl, String applicationName, String namespace, boolean metricsEnabled, List<CompressionAlgorithm> supportedCompressionAlgorithms, String healthEndpoint, boolean gracefulShutdown)
      Creates an instance of a ProxyServerConfig record class.
      Parameters:
      port - the value for the port record component
      runtimeBaseUrl - the value for the runtimeBaseUrl record component
      applicationName - the value for the applicationName record component
      namespace - the value for the namespace record component
      metricsEnabled - the value for the metricsEnabled record component
      supportedCompressionAlgorithms - the value for the supportedCompressionAlgorithms record component
      healthEndpoint - the value for the healthEndpoint record component
      gracefulShutdown - the value for the gracefulShutdown record component
  • Method Details

    • fromProperties

      public static ProxyServerConfig fromProperties()
    • forRuntime

      public static ProxyServerConfig forRuntime(String runtimeBaseUrl)
    • withPort

      public ProxyServerConfig withPort(int port)
    • withNamespace

      public ProxyServerConfig withNamespace(String namespace)
    • withMetricsEnabled

      public ProxyServerConfig withMetricsEnabled(boolean metricsEnabled)
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • port

      public int port()
      Returns the value of the port record component.
      Returns:
      the value of the port record component
    • runtimeBaseUrl

      public String runtimeBaseUrl()
      Returns the value of the runtimeBaseUrl record component.
      Returns:
      the value of the runtimeBaseUrl record component
    • applicationName

      public String applicationName()
      Returns the value of the applicationName record component.
      Returns:
      the value of the applicationName record component
    • namespace

      public String namespace()
      Returns the value of the namespace record component.
      Returns:
      the value of the namespace record component
    • metricsEnabled

      public boolean metricsEnabled()
      Returns the value of the metricsEnabled record component.
      Returns:
      the value of the metricsEnabled record component
    • supportedCompressionAlgorithms

      public List<CompressionAlgorithm> supportedCompressionAlgorithms()
      Returns the value of the supportedCompressionAlgorithms record component.
      Returns:
      the value of the supportedCompressionAlgorithms record component
    • healthEndpoint

      public String healthEndpoint()
      Returns the value of the healthEndpoint record component.
      Returns:
      the value of the healthEndpoint record component
    • gracefulShutdown

      public boolean gracefulShutdown()
      Returns the value of the gracefulShutdown record component.
      Returns:
      the value of the gracefulShutdown record component