Record Class ProxyServerConfig
java.lang.Object
java.lang.Record
io.fluxzero.proxy.ProxyServerConfig
- Record Components:
port- port to bind, or0to select a free portruntimeBaseUrl- Fluxzero Runtime websocket base URLapplicationName- proxy client namenamespace- optional namespace/project idmetricsEnabled- whether the proxy client publishes metricssupportedCompressionAlgorithms- optional compression algorithm preferencehealthEndpoint- HTTP health endpoint pathgracefulShutdown- 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 Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionProxyServerConfig(int port, String runtimeBaseUrl, String applicationName, String namespace, boolean metricsEnabled, List<CompressionAlgorithm> supportedCompressionAlgorithms, String healthEndpoint, boolean gracefulShutdown) Creates an instance of aProxyServerConfigrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theapplicationNamerecord component.final booleanIndicates whether some other object is "equal to" this one.static ProxyServerConfigforRuntime(String runtimeBaseUrl) static ProxyServerConfigbooleanReturns the value of thegracefulShutdownrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of thehealthEndpointrecord component.booleanReturns the value of themetricsEnabledrecord component.Returns the value of thenamespacerecord component.intport()Returns the value of theportrecord component.Returns the value of theruntimeBaseUrlrecord component.Returns the value of thesupportedCompressionAlgorithmsrecord component.final StringtoString()Returns a string representation of this record class.withMetricsEnabled(boolean metricsEnabled) withNamespace(String namespace) withPort(int port)
-
Field Details
-
DEFAULT_APPLICATION_NAME
- See Also:
-
DEFAULT_HEALTH_ENDPOINT
- See Also:
-
-
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 aProxyServerConfigrecord class.- Parameters:
port- the value for theportrecord componentruntimeBaseUrl- the value for theruntimeBaseUrlrecord componentapplicationName- the value for theapplicationNamerecord componentnamespace- the value for thenamespacerecord componentmetricsEnabled- the value for themetricsEnabledrecord componentsupportedCompressionAlgorithms- the value for thesupportedCompressionAlgorithmsrecord componenthealthEndpoint- the value for thehealthEndpointrecord componentgracefulShutdown- the value for thegracefulShutdownrecord component
-
-
Method Details
-
fromProperties
-
forRuntime
-
withPort
-
withNamespace
-
withMetricsEnabled
-
toString
-
hashCode
-
equals
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 withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
port
-
runtimeBaseUrl
Returns the value of theruntimeBaseUrlrecord component.- Returns:
- the value of the
runtimeBaseUrlrecord component
-
applicationName
Returns the value of theapplicationNamerecord component.- Returns:
- the value of the
applicationNamerecord component
-
namespace
-
metricsEnabled
public boolean metricsEnabled()Returns the value of themetricsEnabledrecord component.- Returns:
- the value of the
metricsEnabledrecord component
-
supportedCompressionAlgorithms
Returns the value of thesupportedCompressionAlgorithmsrecord component.- Returns:
- the value of the
supportedCompressionAlgorithmsrecord component
-
healthEndpoint
Returns the value of thehealthEndpointrecord component.- Returns:
- the value of the
healthEndpointrecord component
-
gracefulShutdown
public boolean gracefulShutdown()Returns the value of thegracefulShutdownrecord component.- Returns:
- the value of the
gracefulShutdownrecord component
-