Class DittoTcpListenConfig.Builder
java.lang.Object
com.ditto.java.transports.DittoTcpListenConfig.Builder
-
Method Summary
Modifier and TypeMethodDescription@NonNull StringReturns the current interface IP address.@NonNull DittoTcpListenConfig.BuilderinterfaceIp(@NonNull String interfaceIp) Sets the network interface IP address to bind to.booleanReturns whether TCP listening is currently enabled.@NonNull DittoTcpListenConfig.BuilderisEnabled(boolean enabled) Sets whether TCP listening should be enabled.intport()Returns the current port number.@NonNull DittoTcpListenConfig.Builderport(int port) Sets the TCP port number to listen on.
-
Method Details
-
isEnabled
public boolean isEnabled()Returns whether TCP listening is currently enabled.- Returns:
trueif enabled,falseotherwise.
-
isEnabled
Sets whether TCP listening should be enabled.- Parameters:
enabled-trueto enable,falseto disable.- Returns:
- this Builder for method chaining.
-
interfaceIp
Returns the current interface IP address.- Returns:
- the interface IP address string.
-
interfaceIp
Sets the network interface IP address to bind to.- Parameters:
interfaceIp- the IP address of the network interface to listen on.- Returns:
- this Builder for method chaining.
-
port
public int port()Returns the current port number.- Returns:
- the port number.
-
port
Sets the TCP port number to listen on.- Parameters:
port- the port number (1-65535).- Returns:
- this Builder for method chaining.
-