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(NamedXContentRegistry xContentRegistry)
-
Method Summary
Modifier and Type Method Description FakeRestRequest
build()
FakeRestRequest.Builder
withContent(BytesReference content, XContentType xContentType)
FakeRestRequest.Builder
withHeaders(java.util.Map<java.lang.String,java.util.List<java.lang.String>> headers)
FakeRestRequest.Builder
withMethod(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)
-
-
-
Constructor Detail
-
Builder
public Builder(NamedXContentRegistry xContentRegistry)
-
-
Method Detail
-
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(BytesReference content, XContentType xContentType)
-
withPath
public FakeRestRequest.Builder withPath(java.lang.String path)
-
withMethod
public FakeRestRequest.Builder withMethod(RestRequest.Method method)
-
withRemoteAddress
public FakeRestRequest.Builder withRemoteAddress(java.net.InetSocketAddress address)
-
build
public FakeRestRequest build()
-
-