Package org.forgerock.openig.tools.am
Class NotificationsConfig.Builder
java.lang.Object
org.forgerock.openig.tools.am.NotificationsConfig.Builder
- Enclosing class:
- NotificationsConfig
Builder to ease the creation of a
NotificationsConfig
.-
Constructor Summary
ConstructorDescriptionBuilder
(WebSocketClientProvider clientProvider) Create aNotificationsConfig
builder. -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build theNotificationsConfig
.connectionTimeout
(Duration timeout) Set the connection timeout of the websocket.heartbeat
(Duration interval, ScheduledExecutorService executorService) Set the interval and executorService which will be used to send Websocket heartbeats.idleTimeout
(Duration timeout) Set the idle timeout of the Websocket connection.initialConnectionAttempts
(int attemptCount) Set the number of retries allowed to set up the first connection to the notification service.proxyOptions
(ProxyOptions proxyOptions) Set the theProxyOptions
to use for the websocket connection.reconnectDelay
(Duration reconnectDelay) Set the reconnection delay used when notification service is disconnected.renewalDelay
(Duration renewalDelay) Set the renewal delay of the websocket connection.tlsOptions
(ClientTlsOptions tlsOptions) Set the options to use when establishing secure connection to the WS endpoint.vertxConfig
(JsonValue vertxConfig) Set the vertx configuration to pass to the underlying WebSocket provider.
-
Constructor Details
-
Builder
Create aNotificationsConfig
builder.- Parameters:
clientProvider
- service provider for service to be bound
-
-
Method Details
-
heartbeat
public NotificationsConfig.Builder heartbeat(Duration interval, ScheduledExecutorService executorService) Set the interval and executorService which will be used to send Websocket heartbeats.- Parameters:
interval
- the duration between heartbeats.Duration.UNLIMITED
orDuration.ZERO
disable the feature.executorService
- theScheduledExecutorService
to use to schedule heartbeat tasks- Returns:
- this builder
-
reconnectDelay
Set the reconnection delay used when notification service is disconnected.- Parameters:
reconnectDelay
- reconnection delay used when notification service is disconnected- Returns:
- this builder
-
initialConnectionAttempts
Set the number of retries allowed to set up the first connection to the notification service.- Parameters:
attemptCount
- number of retries allowed to set up the first connection to the notification service- Returns:
- this builder
-
proxyOptions
Set the theProxyOptions
to use for the websocket connection.- Parameters:
proxyOptions
- theProxyOptions
to use for the websocket connection.- Returns:
- this builder
-
tlsOptions
Set the options to use when establishing secure connection to the WS endpoint.- Parameters:
tlsOptions
- options to use when establishing secure connection to the WS endpoint- Returns:
- this builder
-
renewalDelay
Set the renewal delay of the websocket connection.- Parameters:
renewalDelay
- renewal delay of the websocket connection.- Returns:
- this builder
-
connectionTimeout
Set the connection timeout of the websocket.- Parameters:
timeout
- The time to wait for before failing the connection.- Returns:
- this builder
-
idleTimeout
Set the idle timeout of the Websocket connection.- Parameters:
timeout
- The time to wait for without any activity before closing the connection.- Returns:
- this builder
-
vertxConfig
Set the vertx configuration to pass to the underlying WebSocket provider.- Parameters:
vertxConfig
- The vertx configuration.- Returns:
- this builder
-
build
Build theNotificationsConfig
.- Returns:
- the notifications configurations
-