- 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 TypeMethodDescriptionboolean
newBuilder
(XContentType xContentType, boolean useFiltering) newBuilder
(XContentType xContentType, XContentType responseContentType, boolean useFiltering) newBuilder
(XContentType xContentType, XContentType responseContentType, boolean useFiltering, OutputStream out) void
Releases the current output buffer for this channel.request()
void
sendResponse
(RestResponse response)
-
Method Details
-
newBuilder
- Throws:
IOException
-
newErrorBuilder
- Throws:
IOException
-
newBuilder
XContentBuilder newBuilder(@Nullable XContentType xContentType, boolean useFiltering) throws IOException - Throws:
IOException
-
newBuilder
XContentBuilder newBuilder(@Nullable XContentType xContentType, @Nullable XContentType responseContentType, boolean useFiltering) throws IOException - Throws:
IOException
-
newBuilder
XContentBuilder newBuilder(@Nullable XContentType xContentType, @Nullable XContentType responseContentType, boolean useFiltering, OutputStream out) throws IOException - Throws:
IOException
-
bytesOutput
BytesStream bytesOutput() -
releaseOutputBuffer
void releaseOutputBuffer()Releases the current output buffer for this channel. Must be called after the buffer derived frombytesOutput()
is no longer needed. -
request
RestRequest request() -
detailedErrorsEnabled
boolean detailedErrorsEnabled()- Returns:
- true iff an error response should contain additional details like exception traces.
-
sendResponse
-