Class DelegatingJsonEndpoint<Req,Res,Err>
- java.lang.Object
-
- org.opensearch.client.transport.endpoints.DelegatingJsonEndpoint<Req,Res,Err>
-
- All Implemented Interfaces:
Endpoint<Req,Res,Err>,JsonEndpoint<Req,Res,Err>
- Direct Known Subclasses:
EndpointWithResponseMapperAttr
public class DelegatingJsonEndpoint<Req,Res,Err> extends java.lang.Object implements JsonEndpoint<Req,Res,Err>
-
-
Field Summary
Fields Modifier and Type Field Description protected JsonEndpoint<Req,Res,Err>endpoint
-
Constructor Summary
Constructors Constructor Description DelegatingJsonEndpoint(JsonEndpoint<Req,Res,Err> endpoint)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JsonpDeserializer<Err>errorDeserializer(int statusCode)The entity parser for the error response body.booleanhasRequestBody()java.util.Map<java.lang.String,java.lang.String>headers(Req request)Get the HTTP headers for a request.booleanisError(int statusCode)Is this status code to be considered as an error?java.lang.Stringmethod(Req request)Get the endpoint's HTTP method for a request.java.util.Map<java.lang.String,java.lang.String>queryParameters(Req request)Get the query parameters for a request.java.lang.StringrequestUrl(Req request)Get the URL path for a request.JsonpDeserializer<Res>responseDeserializer()The entity parser for the response body.
-
-
-
Field Detail
-
endpoint
protected final JsonEndpoint<Req,Res,Err> endpoint
-
-
Constructor Detail
-
DelegatingJsonEndpoint
public DelegatingJsonEndpoint(JsonEndpoint<Req,Res,Err> endpoint)
-
-
Method Detail
-
method
public java.lang.String method(Req request)
Description copied from interface:EndpointGet the endpoint's HTTP method for a request.
-
requestUrl
public java.lang.String requestUrl(Req request)
Description copied from interface:EndpointGet the URL path for a request.- Specified by:
requestUrlin interfaceEndpoint<Req,Res,Err>
-
queryParameters
public java.util.Map<java.lang.String,java.lang.String> queryParameters(Req request)
Description copied from interface:EndpointGet the query parameters for a request.- Specified by:
queryParametersin interfaceEndpoint<Req,Res,Err>
-
headers
public java.util.Map<java.lang.String,java.lang.String> headers(Req request)
Description copied from interface:EndpointGet the HTTP headers for a request.
-
hasRequestBody
public boolean hasRequestBody()
- Specified by:
hasRequestBodyin interfaceEndpoint<Req,Res,Err>
-
responseDeserializer
@Nullable public JsonpDeserializer<Res> responseDeserializer()
Description copied from interface:JsonEndpointThe entity parser for the response body.- Specified by:
responseDeserializerin interfaceJsonEndpoint<Req,Res,Err>
-
isError
public boolean isError(int statusCode)
Description copied from interface:EndpointIs this status code to be considered as an error?
-
errorDeserializer
@Nullable public JsonpDeserializer<Err> errorDeserializer(int statusCode)
Description copied from interface:EndpointThe entity parser for the error response body. Can benullto indicate that there's no error body.- Specified by:
errorDeserializerin interfaceEndpoint<Req,Res,Err>
-
-