Class DelegatingJsonEndpoint<Req,​Res,​Err>

java.lang.Object
co.elastic.clients.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

    Modifier and Type Method Description
    JsonpDeserializer<Err> errorDeserializer​(int statusCode)
    The entity parser for the error response body.
    boolean hasRequestBody()  
    java.util.Map<java.lang.String,​java.lang.String> headers​(Req request)
    Get the HTTP headers for a request.
    java.lang.String id()
    The endpoint's identifier.
    boolean isError​(int statusCode)
    Is this status code to be considered as an error?
    java.lang.String method​(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.String requestUrl​(Req request)
    Get the URL path for a request.
    JsonpDeserializer<Res> responseDeserializer()
    The entity parser for the response body.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

  • Method Details

    • id

      public java.lang.String id()
      Description copied from interface: Endpoint
      The endpoint's identifier.
      Specified by:
      id in interface Endpoint<Req,​Res,​Err>
    • method

      public java.lang.String method​(Req request)
      Description copied from interface: Endpoint
      Get the endpoint's HTTP method for a request.
      Specified by:
      method in interface Endpoint<Req,​Res,​Err>
    • requestUrl

      public java.lang.String requestUrl​(Req request)
      Description copied from interface: Endpoint
      Get the URL path for a request.
      Specified by:
      requestUrl in interface Endpoint<Req,​Res,​Err>
    • queryParameters

      public java.util.Map<java.lang.String,​java.lang.String> queryParameters​(Req request)
      Description copied from interface: Endpoint
      Get the query parameters for a request.
      Specified by:
      queryParameters in interface Endpoint<Req,​Res,​Err>
    • headers

      public java.util.Map<java.lang.String,​java.lang.String> headers​(Req request)
      Description copied from interface: Endpoint
      Get the HTTP headers for a request.
      Specified by:
      headers in interface Endpoint<Req,​Res,​Err>
    • hasRequestBody

      public boolean hasRequestBody()
      Specified by:
      hasRequestBody in interface Endpoint<Req,​Res,​Err>
    • responseDeserializer

      @Nullable public JsonpDeserializer<Res> responseDeserializer()
      Description copied from interface: JsonEndpoint
      The entity parser for the response body.
      Specified by:
      responseDeserializer in interface JsonEndpoint<Req,​Res,​Err>
    • isError

      public boolean isError​(int statusCode)
      Description copied from interface: Endpoint
      Is this status code to be considered as an error?
      Specified by:
      isError in interface Endpoint<Req,​Res,​Err>
    • errorDeserializer

      @Nullable public JsonpDeserializer<Err> errorDeserializer​(int statusCode)
      Description copied from interface: Endpoint
      The entity parser for the error response body. Can be null to indicate that there's no error body.
      Specified by:
      errorDeserializer in interface Endpoint<Req,​Res,​Err>