Class DittoHttpListenConfig.Builder
java.lang.Object
com.ditto.java.transports.DittoHttpListenConfig.Builder
-
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns whether HTTP listening is currently enabled.@NonNull DittoHttpListenConfig.BuilderisEnabled(boolean enabled) Sets whether HTTP listening should be enabled.booleanReturns whether WebSocket sync is currently enabled.@NonNull DittoHttpListenConfig.BuilderisWebsocketSync(boolean websocketSync) Sets whether WebSocket sync should be enabled.intport()Returns the current port number.@NonNull DittoHttpListenConfig.Builderport(int port) Sets the HTTP port number to listen on.@Nullable StringReturns the current TLS certificate path.@NonNull DittoHttpListenConfig.BuildertlsCertificatePath(@Nullable String tlsCertificatePath) Sets the path to the TLS certificate file for secure connections.@Nullable StringReturns the current TLS key path.@NonNull DittoHttpListenConfig.BuildertlsKeyPath(@Nullable String tlsKeyPath) Sets the path to the TLS private key file for secure connections.
-
Method Details
-
isEnabled
public boolean isEnabled()Returns whether HTTP listening is currently enabled.- Returns:
trueif enabled,falseotherwise.
-
isEnabled
Sets whether HTTP listening should be enabled.- Parameters:
enabled-trueto enable,falseto disable.- Returns:
- this Builder for method chaining.
-
port
public int port()Returns the current port number.- Returns:
- the port number.
-
port
Sets the HTTP port number to listen on.- Parameters:
port- the port number (1-65535).- Returns:
- this Builder for method chaining.
-
isWebsocketSync
public boolean isWebsocketSync()Returns whether WebSocket sync is currently enabled.- Returns:
trueif WebSocket sync is enabled,falseotherwise.
-
isWebsocketSync
Sets whether WebSocket sync should be enabled.- Parameters:
websocketSync-trueto enable WebSocket sync,falseto disable.- Returns:
- this Builder for method chaining.
-
tlsKeyPath
Returns the current TLS key path.- Returns:
- the TLS key file path, or
nullif not set.
-
tlsKeyPath
Sets the path to the TLS private key file for secure connections.- Parameters:
tlsKeyPath- the path to the TLS key file, ornullto disable TLS.- Returns:
- this Builder for method chaining.
-
tlsCertificatePath
Returns the current TLS certificate path.- Returns:
- the TLS certificate file path, or
nullif not set.
-
tlsCertificatePath
public @NonNull DittoHttpListenConfig.Builder tlsCertificatePath(@Nullable String tlsCertificatePath) Sets the path to the TLS certificate file for secure connections.- Parameters:
tlsCertificatePath- the path to the TLS certificate file, ornullto disable TLS.- Returns:
- this Builder for method chaining.
-