Package org.opensearch.client.transport
Interface GenericEndpoint<RequestT,ResponseT>
- All Superinterfaces:
Endpoint<RequestT,ResponseT, ResponseT>
An endpoint with a raw, unparsed response body. The endpoind does not distinguish between errornous and successful response
and always return the raw response body.
-
Method Summary
Modifier and TypeMethodDescriptiondefault JsonpDeserializer<ResponseT> errorDeserializer(int statusCode) The error is never deserialized explicitly, represented as the instance ofGenericEndpointinstead.default booleanisError(int statusCode) Is this status code to be considered as an error?responseDeserializer(String uri, String method, String protocol, int status, String reason, List<Map.Entry<String, String>> headers, String contentType, InputStream body) Constructs theGenericEndpointinstanceMethods inherited from interface org.opensearch.client.transport.Endpoint
exceptionConverter, hasRequestBody, headers, method, queryParameters, requestUrl
-
Method Details
-
isError
default boolean isError(int statusCode) Description copied from interface:EndpointIs this status code to be considered as an error? -
errorDeserializer
The error is never deserialized explicitly, represented as the instance ofGenericEndpointinstead.- Specified by:
errorDeserializerin interfaceEndpoint<RequestT,ResponseT, ResponseT>
-
responseDeserializer
ResponseT responseDeserializer(String uri, String method, String protocol, int status, String reason, List<Map.Entry<String, String>> headers, @Nullable String contentType, @Nullable InputStream body) Constructs theGenericEndpointinstance- Parameters:
uri- request URImethod- HTTP methodprotocol- HTTP protocol versionstatus- status codereason- reason phraseheaders- response headersbody- optional body- Returns:
- the
GenericEndpointinstance
-