RestChannelpublic final class FakeRestChannel extends AbstractRestChannel
detailedErrorsEnabled, request| Constructor | Description |
|---|---|
FakeRestChannel(RestRequest request,
boolean detailedErrorsEnabled,
int responseCount) |
| Modifier and Type | Method | 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, detailedErrorsEnabledpublic FakeRestChannel(RestRequest request, boolean detailedErrorsEnabled, int responseCount)
public XContentBuilder newBuilder() throws java.io.IOException
newBuilder in interface RestChannelnewBuilder in class AbstractRestChanneljava.io.IOExceptionpublic XContentBuilder newErrorBuilder() throws java.io.IOException
newErrorBuilder in interface RestChannelnewErrorBuilder in class AbstractRestChanneljava.io.IOExceptionpublic XContentBuilder newBuilder(@Nullable XContentType requestContentType, boolean useFiltering) throws java.io.IOException
newBuilder in interface RestChannelnewBuilder in class AbstractRestChanneljava.io.IOExceptionprotected BytesStreamOutput newBytesOutput()
newBytesOutput in class AbstractRestChannelpublic RestRequest request()
request in interface RestChannelrequest in class AbstractRestChannelpublic void sendResponse(RestResponse response)
public RestResponse capturedResponse()
public boolean await()
throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic java.util.concurrent.atomic.AtomicInteger responses()
public java.util.concurrent.atomic.AtomicInteger errors()