public final class FakeRestChannel extends AbstractRestChannel
detailedErrorsEnabled, request
Constructor and Description |
---|
FakeRestChannel(RestRequest request,
boolean detailedErrorsEnabled,
int responseCount) |
Modifier and Type | Method and Description |
---|---|
boolean |
await() |
RestResponse |
capturedResponse() |
java.util.concurrent.atomic.AtomicInteger |
errors() |
XContentBuilder |
newBuilder() |
XContentBuilder |
newBuilder(XContentType requestContentType,
boolean useFiltering) |
protected BytesStreamOutput |
newBytesOutput() |
XContentBuilder |
newErrorBuilder() |
RestRequest |
request() |
java.util.concurrent.atomic.AtomicInteger |
responses() |
void |
sendResponse(RestResponse response) |
bytesOutput, bytesOutputOrNull, detailedErrorsEnabled
public FakeRestChannel(RestRequest request, boolean detailedErrorsEnabled, int responseCount)
public XContentBuilder newBuilder() throws java.io.IOException
newBuilder
in interface RestChannel
newBuilder
in class AbstractRestChannel
java.io.IOException
public XContentBuilder newErrorBuilder() throws java.io.IOException
newErrorBuilder
in interface RestChannel
newErrorBuilder
in class AbstractRestChannel
java.io.IOException
public XContentBuilder newBuilder(@Nullable XContentType requestContentType, boolean useFiltering) throws java.io.IOException
newBuilder
in interface RestChannel
newBuilder
in class AbstractRestChannel
java.io.IOException
protected BytesStreamOutput newBytesOutput()
newBytesOutput
in class AbstractRestChannel
public RestRequest request()
request
in interface RestChannel
request
in class AbstractRestChannel
public void sendResponse(RestResponse response)
public RestResponse capturedResponse()
public boolean await() throws java.lang.InterruptedException
java.lang.InterruptedException
public java.util.concurrent.atomic.AtomicInteger responses()
public java.util.concurrent.atomic.AtomicInteger errors()