Interface SslProvider.Builder

Enclosing class:
SslProvider

public static interface SslProvider.Builder
  • Method Details

    • handlerConfigurator

      SslProvider.Builder handlerConfigurator(Consumer<? super SslHandler> handlerConfigurator)
      Set a configurator callback to mutate any property from the provided SslHandler.
      Parameters:
      handlerConfigurator - A callback given the generated SslHandler
      Returns:
      this
    • handshakeTimeout

      SslProvider.Builder handshakeTimeout(Duration handshakeTimeout)
      Set the options to use for configuring SSL handshake timeout. Default to 10000 ms.
      Parameters:
      handshakeTimeout - The timeout Duration
      Returns:
      this
    • handshakeTimeoutMillis

      SslProvider.Builder handshakeTimeoutMillis(long handshakeTimeoutMillis)
      Set the options to use for configuring SSL handshake timeout. Default to 10000 ms.
      Parameters:
      handshakeTimeoutMillis - The timeout in milliseconds
      Returns:
      this
    • closeNotifyFlushTimeout

      SslProvider.Builder closeNotifyFlushTimeout(Duration closeNotifyFlushTimeout)
      Set the options to use for configuring SSL close_notify flush timeout. Default to 3000 ms.
      Parameters:
      closeNotifyFlushTimeout - The timeout Duration
      Returns:
      this
    • closeNotifyFlushTimeoutMillis

      SslProvider.Builder closeNotifyFlushTimeoutMillis(long closeNotifyFlushTimeoutMillis)
      Set the options to use for configuring SSL close_notify flush timeout. Default to 3000 ms.
      Parameters:
      closeNotifyFlushTimeoutMillis - The timeout in milliseconds
      Returns:
      this
    • closeNotifyReadTimeout

      SslProvider.Builder closeNotifyReadTimeout(Duration closeNotifyReadTimeout)
      Set the options to use for configuring SSL close_notify read timeout. Default to 0 ms.
      Parameters:
      closeNotifyReadTimeout - The timeout Duration
      Returns:
      this
    • closeNotifyReadTimeoutMillis

      SslProvider.Builder closeNotifyReadTimeoutMillis(long closeNotifyReadTimeoutMillis)
      Set the options to use for configuring SSL close_notify read timeout. Default to 0 ms.
      Parameters:
      closeNotifyReadTimeoutMillis - The timeout in milliseconds
      Returns:
      this
    • addSniMapping

      SslProvider.Builder addSniMapping(String domainName, Consumer<? super SslProvider.SslContextSpec> sslProviderBuilder)
      Adds a mapping for the given domain name to an SslProvider builder. If a mapping already exists, it will be overridden.

      Note: This method is a sync alternative of setSniAsyncMappings(AsyncMapping), which removes the async mappings.

      Note: This configuration is applicable only when configuring the server.

      Parameters:
      domainName - the domain name, it may contain wildcard
      sslProviderBuilder - an SslProvider builder for building the SslProvider
      Returns:
      this
    • addSniMappings

      SslProvider.Builder addSniMappings(Map<String,Consumer<? super SslProvider.SslContextSpec>> confPerDomainName)
      Adds the provided mappings of domain names to SslProvider builders to the existing mappings. If a mapping already exists, it will be overridden.

      Note: This method is a sync alternative of setSniAsyncMappings(AsyncMapping), which removes the async mappings.

      Note: This configuration is applicable only when configuring the server.

      Parameters:
      confPerDomainName - mappings of domain names to SslProvider builders
      Returns:
      this
    • setSniMappings

      SslProvider.Builder setSniMappings(Map<String,Consumer<? super SslProvider.SslContextSpec>> confPerDomainName)
      Sets the provided mappings of domain names to SslProvider builders. The existing mappings will be removed.

      Note: This method is a sync alternative of setSniAsyncMappings(AsyncMapping), which removes the async mappings.

      Note: This configuration is applicable only when configuring the server.

      Parameters:
      confPerDomainName - mappings of domain names to SslProvider builders
      Returns:
      this
    • setSniAsyncMappings

      SslProvider.Builder setSniAsyncMappings(AsyncMapping<String,SslProvider> mappings)
      Sets the provided mappings of domain names to SslProvider.

      Note: This method is an alternative of addSniMapping(String, Consumer), addSniMappings(Map) and setSniMappings(Map).

      Note: This configuration is applicable only when configuring the server.

      Parameters:
      mappings - mappings of domain names to SslProvider
      Returns:
      this
      Since:
      1.0.19
    • serverNames

      SslProvider.Builder serverNames(SNIServerName... serverNames)
      Sets the desired SNIServerNames. Note: This configuration is applicable only when configuring the client.
      Parameters:
      serverNames - the desired SNIServerNames
      Returns:
      this
    • build

      SslProvider build()
      Builds new SslProvider.
      Returns:
      builds new SslProvider