Class RestResponse

org.elasticsearch.rest.RestResponse
Direct Known Subclasses:
BytesRestResponse

public abstract class RestResponse extends
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     name,  value)
    Add a custom header.
    The response content.
    abstract
    The response content type.
    void
     
    <,​<>>
    <,​<>> headers)
     
    <,​<>>
    Returns custom headers that have been added.
    abstract RestStatus
    The rest status code.

    Methods inherited from class java.lang.

    , , , , , , , , , ,
  • Constructor Details

    • RestResponse

      public RestResponse()
  • Method Details

    • contentType

      public abstract  contentType()
      The response content type.
    • content

      public abstract BytesReference content()
      The response content. Note, if the content is Releasable it should automatically be released when done by the channel sending it.
    • status

      public abstract RestStatus status()
      The rest status code.
    • copyHeaders

      public void copyHeaders(ElasticsearchException ex)
    • addHeader

      public void addHeader( name,  value)
      Add a custom header.
    • getHeaders

      public <,​<>> getHeaders()
      Returns custom headers that have been added. This method should not be used to mutate headers.
    • filterHeaders

      public <,​<>> filterHeaders(<,​<>> headers)