Class SimpleEndpoint<RequestT,ResponseT>
java.lang.Object
co.elastic.clients.transport.endpoints.EndpointBase<RequestT,ResponseT>
co.elastic.clients.transport.endpoints.SimpleEndpoint<RequestT,ResponseT>
- All Implemented Interfaces:
Endpoint<RequestT,
,ResponseT, ErrorResponse> JsonEndpoint<RequestT,
ResponseT, ErrorResponse>
- Direct Known Subclasses:
SimpleJsonEndpoint
public class SimpleEndpoint<RequestT,ResponseT>
extends EndpointBase<RequestT,ResponseT>
implements JsonEndpoint<RequestT,ResponseT,ErrorResponse>
-
Field Summary
Fields inherited from class co.elastic.clients.transport.endpoints.EndpointBase
hasRequestBody, headers, id, method, queryParameters, requestUrl
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionemptyMap()
Returns a function that always returns an empty String to String map.errorDeserializer
(int statusCode) The entity parser for the error response body.static RuntimeException
noPathTemplateFound
(String what) static void
pathEncode
(String src, StringBuilder dest) The entity parser for the response body.<NewResponseT>
SimpleEndpoint<RequestT,NewResponseT> withResponseDeserializer
(JsonpDeserializer<NewResponseT> newResponseParser) Methods inherited from class co.elastic.clients.transport.endpoints.EndpointBase
hasRequestBody, headers, id, isError, method, queryParameters, requestUrl
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface co.elastic.clients.transport.Endpoint
hasRequestBody, headers, id, isError, method, queryParameters, requestUrl
-
Constructor Details
-
SimpleEndpoint
-
-
Method Details
-
emptyMap
Returns a function that always returns an empty String to String map. Useful to avoid creating lots of duplicate lambdas in endpoints that don't have headers or parameters. -
responseDeserializer
Description copied from interface:JsonEndpoint
The entity parser for the response body.- Specified by:
responseDeserializer
in interfaceJsonEndpoint<RequestT,
ResponseT, ErrorResponse>
-
errorDeserializer
Description copied from interface:Endpoint
The entity parser for the error response body. Can benull
to indicate that there's no error body.- Specified by:
errorDeserializer
in interfaceEndpoint<RequestT,
ResponseT, ErrorResponse> - Overrides:
errorDeserializer
in classEndpointBase<RequestT,
ResponseT>
-
withResponseDeserializer
public <NewResponseT> SimpleEndpoint<RequestT,NewResponseT> withResponseDeserializer(JsonpDeserializer<NewResponseT> newResponseParser) - Overrides:
withResponseDeserializer
in classEndpointBase<RequestT,
ResponseT>
-
noPathTemplateFound
-
pathEncode
-