Package org.eclipse.hono.config
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 TypeMethodDescriptionGets 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
port()
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
Gets the generic options.- Returns:
- The options.
-
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. Iffalse
, 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. Iftrue
, 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
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.
-