Package com.hazelcast.config.rest
Class RestConfig
java.lang.Object
com.hazelcast.config.rest.RestConfig
This class allows controlling the Hazelcast REST API feature.
- Since:
- 5.4
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
getPort()
Gets the port of the RestConfig.Gets the name of the Rest security realm.getSsl()
Gets the SSL configuration.Gets the token validity duration.boolean
Checks if the RestConfig is enabled.setEnabled
(boolean enabled) Sets the enabled status of the RestConfig.setPort
(int port) Sets the port of the RestConfig.void
setSecurityRealm
(String securityRealm) Sets the name of the Rest security realm.setSsl
(RestConfig.Ssl ssl) Sets the SSL configuration.void
setTokenValidityDuration
(Duration tokenValidityDuration) Sets the expiration duration for jwt token.toString()
Returns a string representation of the RestConfig.
-
Constructor Details
-
RestConfig
public RestConfig()Default constructor for RestConfig.
-
-
Method Details
-
isEnabled
public boolean isEnabled()Checks if the RestConfig is enabled.- Returns:
- true if the RestConfig is enabled, false otherwise.
-
setEnabled
Sets the enabled status of the RestConfig.- Parameters:
enabled
- the new enabled status.- Returns:
- the updated RestConfig.
-
getPort
public int getPort()Gets the port of the RestConfig.- Returns:
- the port of the RestConfig.
-
setPort
Sets the port of the RestConfig.- Parameters:
port
- the new port.- Returns:
- the updated RestConfig.
-
getSecurityRealm
Gets the name of the Rest security realm.- Returns:
- the name of the realm.
-
setSecurityRealm
Sets the name of the Rest security realm.- Parameters:
securityRealm
- the name of the realm. This should be an already defined valid security realm.
-
getTokenValidityDuration
Gets the token validity duration.- Returns:
- the duration for which the token is valid.
-
setTokenValidityDuration
Sets the expiration duration for jwt token. WARNING: The resolution for tokenValidityDuration can not be more than a second.- Parameters:
tokenValidityDuration
- the duration for which the token should be valid.
-
getSsl
Gets the SSL configuration.- Returns:
- the SSL configuration.
-
setSsl
Sets the SSL configuration.- Parameters:
ssl
- the new SSL configuration.- Returns:
- the updated RestConfig.
-
toString
Returns a string representation of the RestConfig.
-