Package org.elasticsearch.test.rest
Class FakeRestRequest.Builder
java.lang.Object
org.elasticsearch.test.rest.FakeRestRequest.Builder
- Enclosing class:
- FakeRestRequest
public static class FakeRestRequest.Builder
extends java.lang.Object
-
Constructor Summary
Constructors Constructor Description Builder(org.elasticsearch.common.xcontent.NamedXContentRegistry xContentRegistry)
-
Method Summary
Modifier and Type Method Description FakeRestRequest
build()
FakeRestRequest.Builder
withContent(org.elasticsearch.common.bytes.BytesReference content, org.elasticsearch.common.xcontent.XContentType xContentType)
FakeRestRequest.Builder
withHeaders(java.util.Map<java.lang.String,java.util.List<java.lang.String>> headers)
FakeRestRequest.Builder
withInboundException(java.lang.Exception exception)
FakeRestRequest.Builder
withMethod(org.elasticsearch.rest.RestRequest.Method method)
FakeRestRequest.Builder
withParams(java.util.Map<java.lang.String,java.lang.String> params)
FakeRestRequest.Builder
withPath(java.lang.String path)
FakeRestRequest.Builder
withRemoteAddress(java.net.InetSocketAddress address)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
Builder
public Builder(org.elasticsearch.common.xcontent.NamedXContentRegistry xContentRegistry)
-
-
Method Details
-
withHeaders
public FakeRestRequest.Builder withHeaders(java.util.Map<java.lang.String,java.util.List<java.lang.String>> headers) -
withParams
public FakeRestRequest.Builder withParams(java.util.Map<java.lang.String,java.lang.String> params) -
withContent
public FakeRestRequest.Builder withContent(org.elasticsearch.common.bytes.BytesReference content, org.elasticsearch.common.xcontent.XContentType xContentType) -
withPath
-
withMethod
-
withRemoteAddress
-
withInboundException
-
build
-