Class RestClientOpenSearchConfigurationProperties

java.lang.Object
io.micronaut.opensearch.restclient.conf.RestClientOpenSearchConfigurationProperties
All Implemented Interfaces:
io.micronaut.core.util.Toggleable, RestClientOpenSearchConfiguration

@ConfigurationProperties("micronaut.opensearch.rest-client") @Internal public final class RestClientOpenSearchConfigurationProperties extends Object implements RestClientOpenSearchConfiguration
ConfigurationProperties implementation of RestClientOpenSearchConfiguration.
Since:
1.0.0
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final boolean
    The default enable value.
    static final String
    OpenSearch configuration.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.http.Header[]
    The default headers that need to be sent with each request, to prevent having to specify them with each single request.
    org.apache.http.HttpHost[]
    The one or more hosts that the client will communicate with, provided as instances of HttpHost.
    org.opensearch.client.NodeSelector
    The node selector to be used to filter the nodes the client will send requests to among the ones that are set to the client itself.
    boolean
     
    void
    setDefaultHeaders(org.apache.http.Header[] defaultHeaders)
     
    void
    setEnabled(boolean enabled)
    If OpenSearch integration is enabled.
    void
    setHttpHosts(org.apache.http.HttpHost[] httpHosts)
     
    void
    setNodeSelector(org.opensearch.client.NodeSelector nodeSelector)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • RestClientOpenSearchConfigurationProperties

      public RestClientOpenSearchConfigurationProperties()
  • Method Details

    • getHttpHosts

      public org.apache.http.HttpHost[] getHttpHosts()
      Description copied from interface: RestClientOpenSearchConfiguration
      The one or more hosts that the client will communicate with, provided as instances of HttpHost.
      Specified by:
      getHttpHosts in interface RestClientOpenSearchConfiguration
      Returns:
      An array of HttpHost
    • setHttpHosts

      public void setHttpHosts(org.apache.http.HttpHost[] httpHosts)
      Parameters:
      httpHosts - One or more hosts that client will connect to.
    • setNodeSelector

      public void setNodeSelector(org.opensearch.client.NodeSelector nodeSelector)
      Parameters:
      nodeSelector - The NodeSelector to be used, in case of multiple nodes.
    • getNodeSelector

      public org.opensearch.client.NodeSelector getNodeSelector()
      Description copied from interface: RestClientOpenSearchConfiguration
      The node selector to be used to filter the nodes the client will send requests to among the ones that are set to the client itself. By default, the client sends requests to every configured node.
      Specified by:
      getNodeSelector in interface RestClientOpenSearchConfiguration
      Returns:
      The NodeSelector to be used.
    • getDefaultHeaders

      public org.apache.http.Header[] getDefaultHeaders()
      Description copied from interface: RestClientOpenSearchConfiguration
      The default headers that need to be sent with each request, to prevent having to specify them with each single request.
      Specified by:
      getDefaultHeaders in interface RestClientOpenSearchConfiguration
      Returns:
      An array of Header.
    • setDefaultHeaders

      public void setDefaultHeaders(org.apache.http.Header[] defaultHeaders)
      Parameters:
      defaultHeaders - The defaults Header to sent with each request.
    • isEnabled

      public boolean isEnabled()
      Specified by:
      isEnabled in interface io.micronaut.core.util.Toggleable
    • setEnabled

      public void setEnabled(boolean enabled)
      If OpenSearch integration is enabled. Default value true
      Parameters:
      enabled - True if security is enabled