Package org.elasticsearch.rest
Class RestResponse
- java.lang.Object
-
- org.elasticsearch.rest.RestResponse
-
- Direct Known Subclasses:
BytesRestResponse
public abstract class RestResponse extends Object
-
-
Constructor Summary
Constructors Constructor Description RestResponse()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaddHeader(String name, String value)Add a custom header.abstract BytesReferencecontent()The response content.abstract StringcontentType()The response content type.voidcopyHeaders(ElasticsearchException ex)Map<String,List<String>>getHeaders()Returns custom headers that have been added.abstract RestStatusstatus()The rest status code.
-
-
-
Method Detail
-
contentType
public abstract String contentType()
The response content type.
-
content
public abstract BytesReference content()
The response content. Note, if the content isReleasableit 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)
-
-