Class ElasticsearchTransport.JsonParserFn<T>

  • Type Parameters:
    T - result type
    All Implemented Interfaces:
    java.util.function.Function<org.elasticsearch.client.Response,​T>
    Enclosing class:
    ElasticsearchTransport

    private static class ElasticsearchTransport.JsonParserFn<T>
    extends java.lang.Object
    implements java.util.function.Function<org.elasticsearch.client.Response,​T>
    Parses HTTP response into some class using jackson API.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.Class<T> klass  
      private com.fasterxml.jackson.databind.ObjectMapper mapper  
    • Constructor Summary

      Constructors 
      Constructor Description
      JsonParserFn​(com.fasterxml.jackson.databind.ObjectMapper mapper, java.lang.Class<T> klass)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      T apply​(org.elasticsearch.client.Response response)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.function.Function

        andThen, compose
    • Field Detail

      • mapper

        private final com.fasterxml.jackson.databind.ObjectMapper mapper
      • klass

        private final java.lang.Class<T> klass
    • Constructor Detail

      • JsonParserFn

        JsonParserFn​(com.fasterxml.jackson.databind.ObjectMapper mapper,
                     java.lang.Class<T> klass)
    • Method Detail

      • apply

        public T apply​(org.elasticsearch.client.Response response)
        Specified by:
        apply in interface java.util.function.Function<org.elasticsearch.client.Response,​T>