java.lang.Object
org.elasticsearch.rest.RestResponse
org.elasticsearch.rest.BytesRestResponse
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionBytesRestResponse(RestChannel channel, Exception e) BytesRestResponse(RestChannel channel, RestStatus status, Exception e) BytesRestResponse(RestStatus status, String content) Creates a new plain text response.BytesRestResponse(RestStatus status, String responseMediaType, byte[] content) Creates a binary response.BytesRestResponse(RestStatus status, String responseMediaType, String content) Creates a new plain text response.BytesRestResponse(RestStatus status, String responseMediaType, BytesReference content) Creates a binary response.BytesRestResponse(RestStatus status, XContentBuilder builder) Creates a new response based onXContentBuilder. -
Method Summary
Modifier and TypeMethodDescriptioncontent()The response content.The response content type.static ElasticsearchStatusExceptionerrorFromXContent(XContentParser parser) protected booleanstatus()The rest status code.Methods inherited from class org.elasticsearch.rest.RestResponse
addHeader, copyHeaders, filterHeaders, getHeaders
-
Field Details
-
TEXT_CONTENT_TYPE
- See Also:
-
-
Constructor Details
-
BytesRestResponse
Creates a new response based onXContentBuilder. -
BytesRestResponse
Creates a new plain text response. -
BytesRestResponse
Creates a new plain text response. -
BytesRestResponse
Creates a binary response. -
BytesRestResponse
Creates a binary response. -
BytesRestResponse
- Throws:
IOException
-
BytesRestResponse
- Throws:
IOException
-
-
Method Details
-
contentType
Description copied from class:RestResponseThe response content type.- Specified by:
contentTypein classRestResponse
-
content
Description copied from class:RestResponseThe response content. Note, if the content isReleasableit should automatically be released when done by the channel sending it.- Specified by:
contentin classRestResponse
-
status
Description copied from class:RestResponseThe rest status code.- Specified by:
statusin classRestResponse
-
skipStackTrace
protected boolean skipStackTrace() -
errorFromXContent
public static ElasticsearchStatusException errorFromXContent(XContentParser parser) throws IOException - Throws:
IOException
-