Package com.kristensoft.kdc
Class MulticastParameters.Builder
- java.lang.Object
-
- com.kristensoft.kdc.Parameters.Builder<T>
-
- com.kristensoft.kdc.ClientParameters.Builder<MulticastParameters.Builder>
-
- com.kristensoft.kdc.MulticastParameters.Builder
-
- Enclosing class:
- MulticastParameters
public static class MulticastParameters.Builder extends ClientParameters.Builder<MulticastParameters.Builder>
BuildsMulticastParametersinstances.
-
-
Constructor Summary
Constructors Constructor Description Builder()Creates a builder for configuring multicast parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MulticastParameters.BuilderaddEventHandler(MulticastClientEventHandler handler)Adds an event handler to the multicast client event handlers.MulticastParameters.BuilderaddEventHandlers(List<MulticastClientEventHandler> handlers)Adds the specified event handlers to the multicast client event handlers.MulticastParametersbuild()Builds the multicast client parameters using the configured settings.MulticastParameters.BuilderwithEventHandlers(List<MulticastClientEventHandler> handlers)Replaces the multicast client event handlers with the specified handlers.MulticastParameters.BuilderwithSocketOptions(MulticastSocketOptions options)Sets the socket options used by this multicast client.-
Methods inherited from class com.kristensoft.kdc.ClientParameters.Builder
withRemoteAddress, withRemoteAddress, withRemoteAddress, withRemoteAddress, withSendSyncTimeout
-
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
-
withSocketOptions
public MulticastParameters.Builder withSocketOptions(MulticastSocketOptions options)
Sets the socket options used by this multicast client.- Parameters:
options- the multicast socket options- Returns:
- this builder
- Throws:
IllegalArgumentException- ifoptionsisnull
-
addEventHandler
public MulticastParameters.Builder addEventHandler(MulticastClientEventHandler handler)
Adds an event handler to the multicast client event handlers.- Parameters:
handler- the multicast client event handler to add- Returns:
- this builder
- Throws:
IllegalArgumentException- ifhandlerisnull
-
addEventHandlers
public MulticastParameters.Builder addEventHandlers(List<MulticastClientEventHandler> handlers)
Adds the specified event handlers to the multicast client event handlers.Previously configured event handlers are retained.
- Parameters:
handlers- the multicast client event handlers to add- Returns:
- this builder
- Throws:
IllegalArgumentException- ifhandlersisnullor contains anullhandler
-
withEventHandlers
public MulticastParameters.Builder withEventHandlers(List<MulticastClientEventHandler> handlers)
Replaces the multicast client event handlers with the specified handlers.Any previously configured event handlers are removed.
- Parameters:
handlers- the multicast client event handlers to use- Returns:
- this builder
- Throws:
IllegalArgumentException- ifhandlersisnullor contains anullhandler
-
build
public MulticastParameters build()
Builds the multicast client parameters using the configured settings.- Specified by:
buildin classClientParameters.Builder<MulticastParameters.Builder>- Returns:
- the configured multicast client parameters
-
-