Package com.kristensoft.kdc
Class ServerParameters.Builder<T extends ServerParameters.Builder<T>>
- java.lang.Object
-
- com.kristensoft.kdc.Parameters.Builder<T>
-
- com.kristensoft.kdc.ServerParameters.Builder<T>
-
- Type Parameters:
T- the concrete builder type
- Direct Known Subclasses:
KristenHttpServerParameters.Builder,TcpServerParameters.Builder,WebSocketServerParameters.Builder
- Enclosing class:
- ServerParameters
public abstract static class ServerParameters.Builder<T extends ServerParameters.Builder<T>> extends Parameters.Builder<T>
Base builder for KDC server parameters.Provides configuration common to server implementations while preserving the concrete builder type for fluent method chaining.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract ServerParametersbuild()Builds the parameters using the configuration specified by this builder.TwithBacklog(int backlog)Sets the server socket backlog used for pending connection requests.-
Methods inherited from class com.kristensoft.kdc.Parameters.Builder
addWhiteListEntry, registerApi, registerApi, registerApis, withAutoStart, withBindAddress, withBindAddress, withBindAddress, withCompressed, withConnectionQueuePoolSize, withCrc, withEncryptionKey, withLatencyMode, withLatencyReportingInterval, withMaxReceivedBufferSize, withMaxSendBufferSize, withSerializationFormat, withWhiteList
-
-
-
-
Method Detail
-
withBacklog
public T withBacklog(int backlog)
Sets the server socket backlog used for pending connection requests.This value controls the maximum number of connection requests that may be queued by the underlying server socket while waiting to be accepted. It is separate from KDC's internal connection queue.
- Parameters:
backlog- the server socket connection backlog; must be greater than or equal to zero- Returns:
- this builder
- Throws:
IllegalArgumentException- ifbacklogis negative
-
build
public abstract ServerParameters build()
Builds the parameters using the configuration specified by this builder.- Specified by:
buildin classParameters.Builder<T extends ServerParameters.Builder<T>>- Returns:
- the configured parameters
-
-