io.vertx.core.spi.tls

## Class DefaultSslContextFactory

- java.lang.Object
- - io.vertx.core.spi.tls.DefaultSslContextFactory

- All Implemented Interfaces:
    SslContextFactory

      public class DefaultSslContextFactory
      extends Object
      implements SslContextFactory

  The default implementation of `SslContextFactory` that creates and configures a Netty `SslContext` using a `SslContextBuilder`.
  Author:
    Tim Fox, Julien Viet

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultSslContextFactory(SslProvider sslProvider, boolean sslSessionCacheEnabled)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `SslContextFactory` | `applicationProtocols(List<String> applicationProtocols)` Set the application protocols to use when using ALPN.
    `SslContextFactory` | `clientAuth(ClientAuth clientAuth)` Configures the client auth
    `SslContext` | `create()`
    `SslContextFactory` | `enabledCipherSuites(Set<String> enabledCipherSuites)` Set the enabled cipher suites.
    `SslContextFactory` | `forClient(boolean forClient)` Set whether to build a context for clients or for servers
    `SslContextFactory` | `keyMananagerFactory(KeyManagerFactory kmf)` Set the key manager factory to use.
    `SslContextFactory` | `trustManagerFactory(TrustManagerFactory tmf)` Set the trust manager factory to use.
    `SslContextFactory` | `useAlpn(boolean useAlpn)` Set whether to use ALPN.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface io.vertx.core.spi.tls.SslContextFactory

      `serverName`

- - ### Constructor Detail

    - #### DefaultSslContextFactory

          public DefaultSslContextFactory(SslProvider sslProvider,
                                          boolean sslSessionCacheEnabled)

  - ### Method Detail

    - #### useAlpn

          public SslContextFactory useAlpn(boolean useAlpn)

      Description copied from interface: `SslContextFactory`
      Set whether to use ALPN.
      Specified by:
        `useAlpn` in interface `SslContextFactory`
      Parameters:
        `useAlpn` - `true` to use ALPN
      Returns:
        a reference to this, so the API can be used fluently

    - #### clientAuth

          public SslContextFactory clientAuth(ClientAuth clientAuth)

      Description copied from interface: `SslContextFactory`
      Configures the client auth
      Specified by:
        `clientAuth` in interface `SslContextFactory`
      Parameters:
        `clientAuth` - the client auth to use
      Returns:
        a reference to this, so the API can be used fluently

    - #### forClient

          public SslContextFactory forClient(boolean forClient)

      Description copied from interface: `SslContextFactory`
      Set whether to build a context for clients or for servers
      Specified by:
        `forClient` in interface `SslContextFactory`
      Parameters:
        `forClient` - `true` for client otherwise for servers
      Returns:
        a reference to this, so the API can be used fluently

    - #### keyMananagerFactory

          public SslContextFactory keyMananagerFactory(KeyManagerFactory kmf)

      Description copied from interface: `SslContextFactory`
      Set the key manager factory to use.
      Specified by:
        `keyMananagerFactory` in interface `SslContextFactory`
      Parameters:
        `kmf` - the key manager factory instance
      Returns:
        a reference to this, so the API can be used fluently

    - #### trustManagerFactory

          public SslContextFactory trustManagerFactory(TrustManagerFactory tmf)

      Description copied from interface: `SslContextFactory`
      Set the trust manager factory to use.
      Specified by:
        `trustManagerFactory` in interface `SslContextFactory`
      Parameters:
        `tmf` - the trust manager factory instance
      Returns:
        a reference to this, so the API can be used fluently

    - #### create

          public SslContext create()
                            throws SSLException

      Specified by:
        `create` in interface `SslContextFactory`
      Returns:
        a configured `SslContext`
      Throws:
        `SSLException`

    - #### enabledCipherSuites

          public SslContextFactory enabledCipherSuites(Set<String> enabledCipherSuites)

      Description copied from interface: `SslContextFactory`
      Set the enabled cipher suites.
      Specified by:
        `enabledCipherSuites` in interface `SslContextFactory`
      Parameters:
        `enabledCipherSuites` - the set of cipher suites
      Returns:
        a reference to this, so the API can be used fluently

    - #### applicationProtocols

          public SslContextFactory applicationProtocols(List<String> applicationProtocols)

      Description copied from interface: `SslContextFactory`
      Set the application protocols to use when using ALPN.
      Specified by:
        `applicationProtocols` in interface `SslContextFactory`
      Parameters:
        `applicationProtocols` - this list of application protocols
      Returns:
        a reference to this, so the API can be used fluently

Copyright © 2024 Eclipse. All rights reserved.