Interface SslOptions


public interface SslOptions
Configuration options that should be applied when establishing an SSL connection.
Since:
3.1.0
Author:
Scott Frederick
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final SslOptions
    SslOptions that returns null results.
  • Method Summary

    Modifier and Type
    Method
    Description
    static @Nullable Set<String>
    asSet(String @Nullable [] array)
    Helper method that provides a null-safe way to convert a String[] to a Collection for client libraries to use.
    String @Nullable []
    Return the ciphers that can be used or null.
    String @Nullable []
    Return the protocols that should be enabled or null.
    default boolean
    Return if any SSL options have been specified.
    static SslOptions
    of(String @Nullable [] ciphers, String @Nullable [] enabledProtocols)
    Factory method to create a new SslOptions instance.
    static SslOptions
    of(@Nullable Set<String> ciphers, @Nullable Set<String> enabledProtocols)
    Factory method to create a new SslOptions instance.
  • Field Details

  • Method Details

    • isSpecified

      default boolean isSpecified()
      Return if any SSL options have been specified.
      Returns:
      true if SSL options have been specified
    • getCiphers

      String @Nullable [] getCiphers()
      Return the ciphers that can be used or null. The cipher names in this set should be compatible with those supported by SSLEngine.getSupportedCipherSuites().
      Returns:
      the ciphers that can be used or null
    • getEnabledProtocols

      String @Nullable [] getEnabledProtocols()
      Return the protocols that should be enabled or null. The protocols names in this set should be compatible with those supported by SSLEngine.getSupportedProtocols().
      Returns:
      the protocols to enable or null
    • of

      static SslOptions of(String @Nullable [] ciphers, String @Nullable [] enabledProtocols)
      Factory method to create a new SslOptions instance.
      Parameters:
      ciphers - the ciphers
      enabledProtocols - the enabled protocols
      Returns:
      a new SslOptions instance
    • of

      static SslOptions of(@Nullable Set<String> ciphers, @Nullable Set<String> enabledProtocols)
      Factory method to create a new SslOptions instance.
      Parameters:
      ciphers - the ciphers
      enabledProtocols - the enabled protocols
      Returns:
      a new SslOptions instance
    • asSet

      static @Nullable Set<String> asSet(String @Nullable [] array)
      Helper method that provides a null-safe way to convert a String[] to a Collection for client libraries to use.
      Parameters:
      array - the array to convert
      Returns:
      a collection or null