Class StreamingResponse<T>

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

public class StreamingResponse<T> extends Object
HTTP Streaming Response from OpenSearch. This is an experimental API.
  • Constructor Summary

    Constructors
    Constructor
    Description
    StreamingResponse(org.apache.hc.core5.http.message.RequestLine requestLine, org.reactivestreams.Publisher<org.apache.hc.core5.http.Message<org.apache.hc.core5.http.HttpResponse, org.reactivestreams.Publisher<T>>> publisher)
    Constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    org.reactivestreams.Publisher<T>
    Get response boby Publisher
    org.apache.hc.core5.http.HttpHost
    Get host
    org.apache.hc.core5.http.message.RequestLine
    Get request line
    org.apache.hc.core5.http.message.StatusLine
    Returns the status line of the current response
    Returns a list of all warning headers returned in the response.
    void
    setHost(org.apache.hc.core5.http.HttpHost host)
    Set host

    Methods inherited from class java.lang.Object

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

    • StreamingResponse

      public StreamingResponse(org.apache.hc.core5.http.message.RequestLine requestLine, org.reactivestreams.Publisher<org.apache.hc.core5.http.Message<org.apache.hc.core5.http.HttpResponse, org.reactivestreams.Publisher<T>>> publisher)
      Constructor
      Parameters:
      requestLine - request line
      publisher - message publisher(response with a body)
  • Method Details

    • setHost

      public void setHost(org.apache.hc.core5.http.HttpHost host)
      Set host
      Parameters:
      host - host
    • getRequestLine

      public org.apache.hc.core5.http.message.RequestLine getRequestLine()
      Get request line
      Returns:
      request line
    • getHost

      public org.apache.hc.core5.http.HttpHost getHost()
      Get host
      Returns:
      host
    • getBody

      public org.reactivestreams.Publisher<T> getBody()
      Get response boby Publisher
      Returns:
      response boby Publisher
    • getStatusLine

      public org.apache.hc.core5.http.message.StatusLine getStatusLine()
      Returns the status line of the current response
    • getWarnings

      public List<String> getWarnings()
      Returns a list of all warning headers returned in the response.