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
    Returns the value of the first header with a specified name of this message.
    org.apache.hc.core5.http.Header[]
    Returns a list of all headers returned in the response.
    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 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.
    • getHeaders

      public org.apache.hc.core5.http.Header[] getHeaders()
      Returns a list of all headers returned in the response.
    • getHeader

      public String getHeader(String name)
      Returns the value of the first header with a specified name of this message. If there is more than one matching header in the message the first element is returned. If there is no matching header in the message null is returned.
      Parameters:
      name - header name