Class DittoHttpListenConfig
java.lang.Object
com.ditto.java.transports.DittoHttpListenConfig
Configuration for listening on an HTTP/WebSocket server to accept incoming sync connections.
This is an advanced server-like configuration for specific use cases. It supports WebSocket for Ditto sync connections. TLS can be configured for secure connections.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilder for constructing aDittoHttpListenConfig. -
Method Summary
Modifier and TypeMethodDescriptionboolean@NonNull StringReturns the network interface IP address to bind to.intgetPort()Returns the HTTP port number to listen on.@Nullable StringReturns the path to the TLS certificate file.@Nullable StringReturns the path to the TLS private key file.inthashCode()booleanReturns whether HTTP listening is enabled.booleanReturns whether WebSocket sync is enabled.toString()
-
Method Details
-
isEnabled
public boolean isEnabled()Returns whether HTTP listening is enabled.- Returns:
trueif HTTP listen is enabled,falseotherwise.
-
getInterfaceIp
Returns the network interface IP address to bind to.- Returns:
- the interface IP address string.
-
getPort
public int getPort()Returns the HTTP port number to listen on.- Returns:
- the port number.
-
isWebsocketSync
public boolean isWebsocketSync()Returns whether WebSocket sync is enabled.- Returns:
trueif WebSocket sync is enabled,falseotherwise.
-
getTlsKeyPath
Returns the path to the TLS private key file.- Returns:
- the TLS key file path, or
nullif TLS is not configured.
-
getTlsCertificatePath
Returns the path to the TLS certificate file.- Returns:
- the TLS certificate file path, or
nullif TLS is not configured.
-
hashCode
-
equals
-
toString
-