Interface ServerOptions


@ConfigMapping(prefix="hono.server", namingStrategy=VERBATIM) public interface ServerOptions
Common options for configuring components accepting requests/connections on a network socket.
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the host name or literal IP address of the network interface that this server's secure port is configured to be bound to.
    Gets the generic options.
    int
    Gets the insecure port this server is configured to listen on.
    Gets the host name or literal IP address of the network interface that this server's insecure port is configured to be bound to.
    boolean
    Checks if this server is configured to listen on an insecure port (i.e.
    boolean
    Checks if this server requires the usage of a native TLS implementation.
    int
    Gets the secure port this server is configured to listen on.
    boolean
    Checks if this service has been configured to bind to the secure port during startup.
    boolean
    sni()
    Checks if the server supports Server Name Indication for TLS connections.
  • Method Details

    • genericOptions

      @WithParentName GenericOptions genericOptions()
      Gets the generic options.
      Returns:
      The options.
    • bindAddress

      @WithDefault("127.0.0.1") String bindAddress()
      Gets the host name or literal IP address of the network interface that this server's secure port is configured to be bound to.
      Returns:
      The host name.
    • port

      @WithDefault("-1") int port()
      Gets the secure port this server is configured to listen on.
      Returns:
      The port number.
    • securePortEnabled

      @WithDefault("false") boolean securePortEnabled()
      Checks if this service has been configured to bind to the secure port during startup.
      Returns:
      true if a valid key and certificate have been configured.
    • nativeTlsRequired

      @WithDefault("false") boolean nativeTlsRequired()
      Checks if this server requires the usage of a native TLS implementation.

      Native TLS implementations offer in general a better performance but may not be available on all platforms. If true, the server will require the usage of a native TLS implementation. The server will not start if native implementation is not available on the current system. If false, the server will try to use a native TLS implementation but if no native implementation is available, it will fall back to the JVM's default TLS implementation.

      Returns:
      true if the server requires native TLS implementation.
    • insecurePortEnabled

      @WithDefault("false") boolean insecurePortEnabled()
      Checks if this server is configured to listen on an insecure port (i.e. without TLS).

      If false, it is guaranteed by the server that no opened port is insecure. If true, it enables the definition of an insecure port (as the only port or additionally to the secure port).

      Returns:
      false if the server guarantees that no opened port is insecure.
    • insecurePortBindAddress

      @WithDefault("127.0.0.1") String insecurePortBindAddress()
      Gets the host name or literal IP address of the network interface that this server's insecure port is configured to be bound to.
      Returns:
      The host name.
    • insecurePort

      @WithDefault("-1") int insecurePort()
      Gets the insecure port this server is configured to listen on.
      Returns:
      The port number.
    • sni

      @WithDefault("false") boolean sni()
      Checks if the server supports Server Name Indication for TLS connections.
      Returns:
      true if the server supports SNI.