Class HttpClientTransport

  • All Implemented Interfaces:
    java.lang.AutoCloseable

    public class HttpClientTransport
    extends java.lang.Object
    implements java.lang.AutoCloseable
    • Constructor Summary

      Constructors 
      Constructor Description
      HttpClientTransport​(java.util.Optional<SSLFactory> sslFactory, int port, int requestTimeoutInSeconds)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      <T extends org.apache.avro.specific.SpecificRecordBase,​S extends org.apache.avro.specific.SpecificRecordBase>
      T
      sendRequest​(IngestionAction action, S param)  
      <T extends org.apache.avro.specific.SpecificRecordBase,​S extends org.apache.avro.specific.SpecificRecordBase>
      T
      sendRequest​(IngestionAction action, S param, int requestTimeoutInSeconds)
      This method shoves the POST string query params into the URL so the body will only contain the byte array data to make processing/deserializing easier.
      <T extends org.apache.avro.specific.SpecificRecordBase,​S extends org.apache.avro.specific.SpecificRecordBase>
      T
      sendRequestWithRetry​(IngestionAction action, S param, int maxAttempt)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • HttpClientTransport

        public HttpClientTransport​(java.util.Optional<SSLFactory> sslFactory,
                                   int port,
                                   int requestTimeoutInSeconds)
    • Method Detail

      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
      • sendRequest

        public <T extends org.apache.avro.specific.SpecificRecordBase,​S extends org.apache.avro.specific.SpecificRecordBase> T sendRequest​(IngestionAction action,
                                                                                                                                                 S param,
                                                                                                                                                 int requestTimeoutInSeconds)
        This method shoves the POST string query params into the URL so the body will only contain the byte array data to make processing/deserializing easier. Please make sure the query params doesn't exceed the URL limit of 2048 chars.
      • sendRequest

        public <T extends org.apache.avro.specific.SpecificRecordBase,​S extends org.apache.avro.specific.SpecificRecordBase> T sendRequest​(IngestionAction action,
                                                                                                                                                 S param)
      • sendRequestWithRetry

        public <T extends org.apache.avro.specific.SpecificRecordBase,​S extends org.apache.avro.specific.SpecificRecordBase> T sendRequestWithRetry​(IngestionAction action,
                                                                                                                                                          S param,
                                                                                                                                                          int maxAttempt)