Package com.hazelcast.config
Class RestApiConfig
java.lang.Object
com.hazelcast.config.RestApiConfig
This class allows controlling which parts of Hazelcast REST API will be enabled. There are 2 levels of control:
- overall REST access (enabled by default);
- access to REST endpoint groups (see
RestEndpointGroup
).
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionDisables all REST endpoint groups.disableGroups
(RestEndpointGroup... endpointGroups) Disables provided REST endpoint groups.Enables all REST endpoint groups.enableGroups
(RestEndpointGroup... endpointGroups) Enables provided REST endpoint groups.boolean
Returns a not-null
set of enabled REST endpoint groups.int
hashCode()
boolean
Checks if REST API access is enabled.boolean
Return true if the REST API is enabled and at least one REST endpoint group is allowed.boolean
isGroupEnabled
(RestEndpointGroup group) Checks if given REST endpoint group is enabled.setEnabled
(boolean enabled) Enables or disables the REST API on the member.setEnabledGroups
(Collection<RestEndpointGroup> groups) toString()
-
Constructor Details
-
RestApiConfig
public RestApiConfig()
-
-
Method Details
-
enableAllGroups
Enables all REST endpoint groups. -
enableGroups
Enables provided REST endpoint groups. It doesn't replace already enabled groups. -
disableAllGroups
Disables all REST endpoint groups. -
disableGroups
Disables provided REST endpoint groups. -
isEnabled
public boolean isEnabled()Checks if REST API access is enabled. This flag controls access to all REST resources on a Hazelcast member. Once the REST API is enabled you can control access to REST endpoints by enabling/disabling endpoint groups.- Returns:
true
if enabled,false
otherwise
-
isEnabledAndNotEmpty
public boolean isEnabledAndNotEmpty()Return true if the REST API is enabled and at least one REST endpoint group is allowed. -
setEnabled
Enables or disables the REST API on the member. -
getEnabledGroups
Returns a not-null
set of enabled REST endpoint groups. -
isGroupEnabled
Checks if given REST endpoint group is enabled. It can returntrue
even if the REST API itself is disabled. -
setEnabledGroups
-
toString
-
equals
-
hashCode
public int hashCode()
-