Class StreamingRequest<T>

java.lang.Object
org.opensearch.client.StreamingRequest<T>

public class StreamingRequest<T> extends Object
HTTP Streaming Request to OpenSearch. This is an experimental API.
  • Constructor Details

    • StreamingRequest

      public StreamingRequest(String method, String endpoint, org.reactivestreams.Publisher<T> publisher)
      Constructor
      Parameters:
      method - method
      endpoint - endpoint
      publisher - publisher
  • Method Details

    • getEndpoint

      public String getEndpoint()
      Get endpoint
      Returns:
      endpoint
    • getMethod

      public String getMethod()
      Get method
      Returns:
      method
    • getOptions

      public RequestOptions getOptions()
      Get options
      Returns:
      options
    • getParameters

      public Map<String,String> getParameters()
      Get parameters
      Returns:
      parameters
    • addParameter

      public void addParameter(String name, String value)
      Add a query string parameter.
      Parameters:
      name - the name of the url parameter. Must not be null.
      value - the value of the url url parameter. If null then the parameter is sent as name rather than name=value
      Throws:
      IllegalArgumentException - if a parameter with that name has already been set
    • addParameters

      public void addParameters(Map<String,String> paramSource)
      Add query parameters using the provided map of key value pairs.
      Parameters:
      paramSource - a map of key value pairs where the key is the url parameter.
      Throws:
      IllegalArgumentException - if a parameter with that name has already been set.
    • getBody

      public org.reactivestreams.Publisher<T> getBody()
      Body publisher
      Returns:
      body publisher