Class ApacheHttpClient

  • All Implemented Interfaces:
    Loki4jHttpClient, java.lang.AutoCloseable

    public final class ApacheHttpClient
    extends java.lang.Object
    implements Loki4jHttpClient
    Loki sender that is backed by Apache HttpClient
    • Constructor Detail

      • ApacheHttpClient

        public ApacheHttpClient​(HttpConfig conf)
    • Method Detail

      • close

        public void close()
                   throws java.lang.Exception
        Specified by:
        close in interface java.lang.AutoCloseable
        Throws:
        java.lang.Exception
      • send

        public LokiResponse send​(java.nio.ByteBuffer batch)
                          throws java.lang.Exception
        Description copied from interface: Loki4jHttpClient
        Send a batch to Loki
        Specified by:
        send in interface Loki4jHttpClient
        Returns:
        A response from Loki
        Throws:
        java.lang.Exception - If send was not successful