com.hazelcast.config

## Class RestServerEndpointConfig

- java.lang.Object
- - com.hazelcast.config.EndpointConfig
  - - com.hazelcast.config.ServerSocketEndpointConfig
    - - com.hazelcast.config.RestServerEndpointConfig

- All Implemented Interfaces:
    NamedConfig

      public class RestServerEndpointConfig
      extends ServerSocketEndpointConfig

  Server socket endpoint config specialized for REST service Allows configuring access to REST groups similar to `RestApiConfig`
  Since:
    3.12

- - ### Field Summary

    - ### Fields inherited from class com.hazelcast.config.ServerSocketEndpointConfig

      `DEFAULT_PORT, PORT_AUTO_INCREMENT`

    - ### Fields inherited from class com.hazelcast.config.EndpointConfig

      `DEFAULT_SOCKET_CONNECT_TIMEOUT_SECONDS, DEFAULT_SOCKET_LINGER_SECONDS, DEFAULT_SOCKET_RECEIVE_BUFFER_SIZE_KB, DEFAULT_SOCKET_SEND_BUFFER_SIZE_KB, interfaces, name, protocolType, socketInterceptorConfig, sslConfig, symmetricEncryptionConfig`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `RestServerEndpointConfig()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `RestServerEndpointConfig` | `addOutboundPort(int port)`
    `RestServerEndpointConfig` | `addOutboundPortDefinition(String portDef)`
    `RestServerEndpointConfig` | `disableAllGroups()` Disables all REST endpoint groups.
    `RestServerEndpointConfig` | `disableGroups(RestEndpointGroup... endpointGroups)` Disables provided REST endpoint groups.
    `RestServerEndpointConfig` | `enableAllGroups()` Enables all REST endpoint groups.
    `RestServerEndpointConfig` | `enableGroups(RestEndpointGroup... endpointGroups)` Enables provided REST endpoint groups.
    `Set<RestEndpointGroup>` | `getEnabledGroups()` Returns a not-`null` set of enabled REST endpoint groups.
    `ProtocolType` | `getProtocolType()`
    `EndpointQualifier` | `getQualifier()`
    `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.
    `void` | `setEnabledGroups(Collection<RestEndpointGroup> groups)`
    `RestServerEndpointConfig` | `setInterfaces(InterfacesConfig interfaces)`
    `RestServerEndpointConfig` | `setName(String name)`
    `RestServerEndpointConfig` | `setOutboundPortDefinitions(Collection<String> outboundPortDefs)`
    `RestServerEndpointConfig` | `setOutboundPorts(Collection<Integer> outboundPorts)`
    `RestServerEndpointConfig` | `setPort(int port)` Sets the port the Hazelcast member will try to bind on.
    `RestServerEndpointConfig` | `setPortAutoIncrement(boolean portAutoIncrement)` Sets if a Hazelcast member is allowed to find a free port by incrementing the port number when it encounters an occupied port.
    `RestServerEndpointConfig` | `setPublicAddress(String publicAddress)` Overrides the public address of a member.
    `RestServerEndpointConfig` | `setReuseAddress(boolean reuseAddress)` Sets the reuse address.
    `RestServerEndpointConfig` | `setSocketBufferDirect(boolean socketBufferDirect)`
    `RestServerEndpointConfig` | `setSocketConnectTimeoutSeconds(int socketConnectTimeoutSeconds)`
    `RestServerEndpointConfig` | `setSocketInterceptorConfig(SocketInterceptorConfig socketInterceptorConfig)` Sets the `SocketInterceptorConfig`.
    `RestServerEndpointConfig` | `setSocketKeepAlive(boolean socketKeepAlive)`
    `RestServerEndpointConfig` | `setSocketLingerSeconds(int socketLingerSeconds)`
    `RestServerEndpointConfig` | `setSocketRcvBufferSizeKb(int socketRcvBufferSizeKb)`
    `RestServerEndpointConfig` | `setSocketSendBufferSizeKb(int socketSendBufferSizeKb)`
    `RestServerEndpointConfig` | `setSocketTcpNoDelay(boolean socketTcpNoDelay)`
    `RestServerEndpointConfig` | `setSSLConfig(SSLConfig sslConfig)` Sets the `SSLConfig`.
    `RestServerEndpointConfig` | `setSymmetricEncryptionConfig(SymmetricEncryptionConfig symmetricEncryptionConfig)` Sets the `SymmetricEncryptionConfig`.
    `String` | `toString()`

    - ### Methods inherited from class com.hazelcast.config.ServerSocketEndpointConfig

      `getPort, getPortCount, getPublicAddress, isPortAutoIncrement, isReuseAddress, setPortCount`

    - ### Methods inherited from class com.hazelcast.config.EndpointConfig

      `getInterfaces, getName, getOutboundPortDefinitions, getOutboundPorts, getSocketConnectTimeoutSeconds, getSocketInterceptorConfig, getSocketLingerSeconds, getSocketRcvBufferSizeKb, getSocketSendBufferSizeKb, getSSLConfig, getSymmetricEncryptionConfig, isSocketBufferDirect, isSocketKeepAlive, isSocketTcpNoDelay`

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

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

- - ### Constructor Detail

    - #### RestServerEndpointConfig

          public RestServerEndpointConfig()

  - ### Method Detail

    - #### getProtocolType

          public final ProtocolType getProtocolType()

      Overrides:
        `getProtocolType` in class `EndpointConfig`

    - #### getQualifier

          public EndpointQualifier getQualifier()

      Overrides:
        `getQualifier` in class `EndpointConfig`

    - #### enableAllGroups

          public RestServerEndpointConfig enableAllGroups()

      Enables all REST endpoint groups.

    - #### enableGroups

          public RestServerEndpointConfig enableGroups(RestEndpointGroup... endpointGroups)

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

    - #### disableAllGroups

          public RestServerEndpointConfig disableAllGroups()

      Disables all REST endpoint groups.

    - #### disableGroups

          public RestServerEndpointConfig disableGroups(RestEndpointGroup... endpointGroups)

      Disables provided REST endpoint groups.

    - #### isEnabledAndNotEmpty

          public boolean isEnabledAndNotEmpty()

      Return true if the REST API is enabled and at least one REST endpoint group is allowed.

    - #### 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)

    - #### setPublicAddress

          public RestServerEndpointConfig setPublicAddress(String publicAddress)

      Description copied from class: `ServerSocketEndpointConfig`
      Overrides the public address of a member. Behind a NAT, two endpoints may not be able to see/access each other. If both nodes set their public addresses to their defined addresses on NAT, then that way they can communicate with each other. It should be set in the format “host IP address:port number”.
      Overrides:
        `setPublicAddress` in class `ServerSocketEndpointConfig`

    - #### setPort

          public RestServerEndpointConfig setPort(int port)

      Description copied from class: `ServerSocketEndpointConfig`
      Sets the port the Hazelcast member will try to bind on. A valid port value is between 0 and 65535. A port number of 0 will let the system pick up an ephemeral port.
      Overrides:
        `setPort` in class `ServerSocketEndpointConfig`
      Parameters:
        `port` - the port the Hazelcast member will try to bind on
      Returns:
        NetworkConfig the updated NetworkConfig
      See Also:
        `ServerSocketEndpointConfig.getPort()`, `for more information`

    - #### setPortAutoIncrement

          public RestServerEndpointConfig setPortAutoIncrement(boolean portAutoIncrement)

      Description copied from class: `ServerSocketEndpointConfig`
      Sets if a Hazelcast member is allowed to find a free port by incrementing the port number when it encounters an occupied port.

      If you explicitly want to control the port a Hazelcast member is going to use, you probably want to set portAutoincrement to false. In this case, the Hazelcast member is going to try the port `ServerSocketEndpointConfig.setPort(int)` and if the port is not free, the member will not start and throw an exception.

      If this value is set to true, Hazelcast will start at the port specified by `ServerSocketEndpointConfig.setPort(int)` and will try until it finds a free port, or until it runs out of ports to try `ServerSocketEndpointConfig.setPortCount(int)`.

      Overrides:
        `setPortAutoIncrement` in class `ServerSocketEndpointConfig`
      Parameters:
        `portAutoIncrement` - the portAutoIncrement to set
      Returns:
        the updated NetworkConfig
      See Also:
        `ServerSocketEndpointConfig.isPortAutoIncrement()`, `ServerSocketEndpointConfig.setPortCount(int)`, `ServerSocketEndpointConfig.setPort(int)`

    - #### setReuseAddress

          public RestServerEndpointConfig setReuseAddress(boolean reuseAddress)

      Description copied from class: `ServerSocketEndpointConfig`
      Sets the reuse address.

      When should setReuseAddress(true) be used?

      When the member is shutdown, the server socket port will be in TIME_WAIT state for the next 2 minutes or so. If you start the member right after shutting it down, you may not be able to bind to the same port because it is in TIME_WAIT state. if you set reuseAddress=true then TIME_WAIT will be ignored and you will be able to bind to the same port again.

      This property should not be set to true on the Windows platform: see

      1. http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6421091
      2. http://www.hsc.fr/ressources/articles/win_net_srv/multiple_bindings.html
      By default, if the OS is Windows then reuseAddress will be false.
      Overrides:
        `setReuseAddress` in class `ServerSocketEndpointConfig`

    - #### setName

          public RestServerEndpointConfig setName(String name)

      Specified by:
        `setName` in interface `NamedConfig`
      Overrides:
        `setName` in class `ServerSocketEndpointConfig`

    - #### setOutboundPortDefinitions

          public RestServerEndpointConfig setOutboundPortDefinitions(Collection<String> outboundPortDefs)

      Overrides:
        `setOutboundPortDefinitions` in class `ServerSocketEndpointConfig`

    - #### setOutboundPorts

          public RestServerEndpointConfig setOutboundPorts(Collection<Integer> outboundPorts)

      Overrides:
        `setOutboundPorts` in class `ServerSocketEndpointConfig`

    - #### setInterfaces

          public RestServerEndpointConfig setInterfaces(InterfacesConfig interfaces)

      Overrides:
        `setInterfaces` in class `ServerSocketEndpointConfig`
      Parameters:
        `interfaces` - the interfaces to set

    - #### setSocketBufferDirect

          public RestServerEndpointConfig setSocketBufferDirect(boolean socketBufferDirect)

      Overrides:
        `setSocketBufferDirect` in class `ServerSocketEndpointConfig`

    - #### setSocketKeepAlive

          public RestServerEndpointConfig setSocketKeepAlive(boolean socketKeepAlive)

      Overrides:
        `setSocketKeepAlive` in class `ServerSocketEndpointConfig`

    - #### setSocketTcpNoDelay

          public RestServerEndpointConfig setSocketTcpNoDelay(boolean socketTcpNoDelay)

      Overrides:
        `setSocketTcpNoDelay` in class `ServerSocketEndpointConfig`

    - #### setSocketSendBufferSizeKb

          public RestServerEndpointConfig setSocketSendBufferSizeKb(int socketSendBufferSizeKb)

      Overrides:
        `setSocketSendBufferSizeKb` in class `ServerSocketEndpointConfig`

    - #### setSocketRcvBufferSizeKb

          public RestServerEndpointConfig setSocketRcvBufferSizeKb(int socketRcvBufferSizeKb)

      Overrides:
        `setSocketRcvBufferSizeKb` in class `ServerSocketEndpointConfig`

    - #### setSocketLingerSeconds

          public RestServerEndpointConfig setSocketLingerSeconds(int socketLingerSeconds)

      Overrides:
        `setSocketLingerSeconds` in class `ServerSocketEndpointConfig`

    - #### setSocketConnectTimeoutSeconds

          public RestServerEndpointConfig setSocketConnectTimeoutSeconds(int socketConnectTimeoutSeconds)

      Overrides:
        `setSocketConnectTimeoutSeconds` in class `ServerSocketEndpointConfig`

    - #### setSocketInterceptorConfig

          public RestServerEndpointConfig setSocketInterceptorConfig(SocketInterceptorConfig socketInterceptorConfig)

      Description copied from class: `EndpointConfig`
      Sets the `SocketInterceptorConfig`. The value can be `null` if no socket interception is needed.
      Overrides:
        `setSocketInterceptorConfig` in class `ServerSocketEndpointConfig`
      Parameters:
        `socketInterceptorConfig` - the SocketInterceptorConfig to set
      Returns:
        the updated NetworkConfig

    - #### setSSLConfig

          public RestServerEndpointConfig setSSLConfig(SSLConfig sslConfig)

      Description copied from class: `EndpointConfig`
      Sets the `SSLConfig`. null value indicates that no SSLConfig should be used.
      Overrides:
        `setSSLConfig` in class `ServerSocketEndpointConfig`
      Parameters:
        `sslConfig` - the SSLConfig
      Returns:
        the updated NetworkConfig
      See Also:
        `EndpointConfig.getSSLConfig()`

    - #### setSymmetricEncryptionConfig

          public RestServerEndpointConfig setSymmetricEncryptionConfig(SymmetricEncryptionConfig symmetricEncryptionConfig)

      Description copied from class: `EndpointConfig`
      Sets the `SymmetricEncryptionConfig`. The value can be `null` if no symmetric encryption should be used.
      Overrides:
        `setSymmetricEncryptionConfig` in class `ServerSocketEndpointConfig`
      Parameters:
        `symmetricEncryptionConfig` - the SymmetricEncryptionConfig to set
      Returns:
        the updated NetworkConfig
      See Also:
        `EndpointConfig.getSymmetricEncryptionConfig()`

    - #### addOutboundPortDefinition

          public RestServerEndpointConfig addOutboundPortDefinition(String portDef)

      Overrides:
        `addOutboundPortDefinition` in class `EndpointConfig`

    - #### addOutboundPort

          public RestServerEndpointConfig addOutboundPort(int port)

      Overrides:
        `addOutboundPort` in class `EndpointConfig`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `ServerSocketEndpointConfig`

Copyright © 2019. All rights reserved.