Class Endpoint.Simple<RequestT,​ResponseT>

java.lang.Object
org.opensearch.client.base.Endpoint.Simple<RequestT,​ResponseT>
All Implemented Interfaces:
Endpoint<RequestT,​ResponseT,​OpenSearchError>
Direct Known Subclasses:
Endpoint.Boolean
Enclosing interface:
Endpoint<RequestT,​ResponseT,​ErrorT>

public static class Endpoint.Simple<RequestT,​ResponseT>
extends java.lang.Object
implements Endpoint<RequestT,​ResponseT,​OpenSearchError>
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.opensearch.client.base.Endpoint

    Endpoint.Boolean<RequestT>, Endpoint.Simple<RequestT,​ResponseT>
  • Constructor Summary

    Constructors 
    Constructor Description
    Simple​(java.util.function.Function<RequestT,​java.lang.String> method, java.util.function.Function<RequestT,​java.lang.String> requestUrl, java.util.function.Function<RequestT,​java.util.Map<java.lang.String,​java.lang.String>> queryParameters, java.util.function.Function<RequestT,​java.util.Map<java.lang.String,​java.lang.String>> headers, boolean hasRequestBody, JsonpDeserializer<ResponseT> responseParser)  
  • Method Summary

    Modifier and Type Method Description
    static <T> java.util.function.Function<T,​java.util.Map<java.lang.String,​java.lang.String>> emptyMap()
    Returns a function that always returns an empty String to String map.
    JsonpDeserializer<OpenSearchError> errorParser​(int statusCode)
    The entity parser for the error response body.
    boolean hasRequestBody()  
    java.util.Map<java.lang.String,​java.lang.String> headers​(RequestT request)
    Build the headers for a request
    boolean isError​(int statusCode)  
    java.lang.String method​(RequestT request)
    The endpoint's http method
    static java.lang.RuntimeException noPathTemplateFound​(java.lang.String what)  
    java.util.Map<java.lang.String,​java.lang.String> queryParameters​(RequestT request)
    Build the query parameters for a request
    java.lang.String requestUrl​(RequestT request)
    Build the URL path for a request
    JsonpDeserializer<ResponseT> responseParser()
    The entity parser for the response body.
    <NewResponseT>
    Endpoint.Simple<RequestT,​NewResponseT>
    withResponseDeserializer​(JsonpDeserializer<NewResponseT> newResponseParser)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait