public abstract class AbstractRestChannel extends Object implements RestChannel
Modifier and Type | Field and Description |
---|---|
protected boolean |
detailedErrorsEnabled |
protected RestRequest |
request |
Modifier | Constructor and Description |
---|---|
protected |
AbstractRestChannel(RestRequest request,
boolean detailedErrorsEnabled) |
Modifier and Type | Method and Description |
---|---|
BytesStreamOutput |
bytesOutput()
A channel level bytes output that can be reused.
|
boolean |
detailedErrorsEnabled() |
XContentBuilder |
newBuilder() |
XContentBuilder |
newBuilder(BytesReference autoDetectSource,
boolean useFiltering) |
protected BytesStreamOutput |
newBytesOutput() |
XContentBuilder |
newErrorBuilder() |
RestRequest |
request() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
sendResponse
protected final RestRequest request
protected final boolean detailedErrorsEnabled
protected AbstractRestChannel(RestRequest request, boolean detailedErrorsEnabled)
public XContentBuilder newBuilder() throws IOException
newBuilder
in interface RestChannel
IOException
public XContentBuilder newErrorBuilder() throws IOException
newErrorBuilder
in interface RestChannel
IOException
public XContentBuilder newBuilder(@Nullable BytesReference autoDetectSource, boolean useFiltering) throws IOException
newBuilder
in interface RestChannel
IOException
public final BytesStreamOutput bytesOutput()
bytesOutput
in interface RestChannel
protected BytesStreamOutput newBytesOutput()
public RestRequest request()
request
in interface RestChannel
public boolean detailedErrorsEnabled()
detailedErrorsEnabled
in interface RestChannel
Copyright © 2009–2016. All rights reserved.