Class NotificationsConfig.Builder

java.lang.Object
org.forgerock.openig.tools.am.NotificationsConfig.Builder
Enclosing class:
NotificationsConfig

public static final class NotificationsConfig.Builder extends Object
Builder to ease the creation of a NotificationsConfig.
  • Constructor Details

  • 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 or Duration.ZERO disable the feature.
      executorService - the ScheduledExecutorService to use to schedule heartbeat tasks
      Returns:
      this builder
    • reconnectDelay

      public NotificationsConfig.Builder reconnectDelay(Duration 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

      public NotificationsConfig.Builder initialConnectionAttempts(int attemptCount)
      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

      public NotificationsConfig.Builder proxyOptions(ProxyOptions proxyOptions)
      Set the the ProxyOptions to use for the websocket connection.
      Parameters:
      proxyOptions - the ProxyOptions to use for the websocket connection.
      Returns:
      this builder
    • tlsOptions

      public NotificationsConfig.Builder tlsOptions(ClientTlsOptions 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

      public NotificationsConfig.Builder renewalDelay(Duration renewalDelay)
      Set the renewal delay of the websocket connection.
      Parameters:
      renewalDelay - renewal delay of the websocket connection.
      Returns:
      this builder
    • connectionTimeout

      public NotificationsConfig.Builder connectionTimeout(Duration timeout)
      Set the connection timeout of the websocket.
      Parameters:
      timeout - The time to wait for before failing the connection.
      Returns:
      this builder
    • idleTimeout

      public NotificationsConfig.Builder idleTimeout(Duration timeout)
      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

      public NotificationsConfig.Builder vertxConfig(JsonValue vertxConfig)
      Set the vertx configuration to pass to the underlying WebSocket provider.
      Parameters:
      vertxConfig - The vertx configuration.
      Returns:
      this builder
    • build

      public NotificationsConfig build()
      Returns:
      the notifications configurations