Package org.elasticsearch.rest
Interface RestChannel
- All Known Implementing Classes:
AbstractRestChannel,DefaultRestChannel
public interface RestChannel
A channel used to construct bytes / builder based outputs, and send responses.
-
Method Summary
Modifier and Type Method Description BytesStreamOutputbytesOutput()booleandetailedErrorsEnabled()XContentBuildernewBuilder()XContentBuildernewBuilder(XContentType xContentType, boolean useFiltering)XContentBuildernewBuilder(XContentType xContentType, XContentType responseContentType, boolean useFiltering)XContentBuildernewErrorBuilder()RestRequestrequest()voidsendResponse(RestResponse response)
-
Method Details
-
newBuilder
- Throws:
java.io.IOException
-
newErrorBuilder
- Throws:
java.io.IOException
-
newBuilder
XContentBuilder newBuilder(@Nullable XContentType xContentType, boolean useFiltering) throws java.io.IOException- Throws:
java.io.IOException
-
newBuilder
XContentBuilder newBuilder(@Nullable XContentType xContentType, @Nullable XContentType responseContentType, boolean useFiltering) throws java.io.IOException- Throws:
java.io.IOException
-
bytesOutput
BytesStreamOutput bytesOutput() -
request
RestRequest request() -
detailedErrorsEnabled
boolean detailedErrorsEnabled()- Returns:
- true iff an error response should contain additional details like exception traces.
-
sendResponse
-