com.hazelcast.config

## Class RestApiConfig

- java.lang.Object
- - com.hazelcast.config.RestApiConfig

-     public class RestApiConfig
      extends Object

  This class allows to control 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

    Constructors
    Constructor and Description
    `RestApiConfig()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `RestApiConfig` | `disableAllGroups()` Disables all REST endpoint groups.
    `RestApiConfig` | `disableGroups(RestEndpointGroup... endpointGroups)` Disables provided REST endpoint groups.
    `RestApiConfig` | `enableAllGroups()` Enables all REST endpoint groups.
    `RestApiConfig` | `enableGroups(RestEndpointGroup... endpointGroups)` Enables provided REST endpoint groups.
    `Set<RestEndpointGroup>` | `getEnabledGroups()` Returns a not-`null` set of enabled REST endpoint groups.
    `boolean` | `isEnabled()` Checks if REST API access is enabled.
    `boolean` | `isEnabledAndNotEmpty()` 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.
    `RestApiConfig` | `setEnabled(boolean enabled)` Enables or disables the REST API on the member.
    `void` | `setEnabledGroups(Collection<RestEndpointGroup> groups)`
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### RestApiConfig

          public RestApiConfig()

  - ### Method Detail

    - #### enableAllGroups

          public RestApiConfig enableAllGroups()

      Enables all REST endpoint groups.

    - #### enableGroups

          public RestApiConfig enableGroups(RestEndpointGroup... endpointGroups)

      Enables provided REST endpoint groups. It doesn't replace already enabled groups.

    - #### disableAllGroups

          public RestApiConfig disableAllGroups()

      Disables all REST endpoint groups.

    - #### disableGroups

          public RestApiConfig disableGroups(RestEndpointGroup... endpointGroups)

      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 enpoint 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

          public RestApiConfig setEnabled(boolean enabled)

      Enables or disables the REST API on the member.

    - #### getEnabledGroups

          public Set<RestEndpointGroup> getEnabledGroups()

      Returns a not-`null` set of enabled REST endpoint groups.

    - #### isGroupEnabled

          public boolean isGroupEnabled(RestEndpointGroup group)

      Checks if given REST endpoint group is enabled. It can return `true` even if the REST API itself is disabled.

    - #### setEnabledGroups

          public void setEnabledGroups(Collection<RestEndpointGroup> groups)

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2019. All rights reserved.