Class ApacheHttpClientChannels.CloseableClient

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable
    Enclosing class:
    ApacheHttpClientChannels

    public static final class ApacheHttpClientChannels.CloseableClient
    extends java.lang.Object
    implements java.io.Closeable
    Intentionally opaque wrapper type - we don't want people using the inner Apache client directly.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      protected void finalize()
      Object.finalize() gets called when this object is GC'd.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Method Detail

      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Throws:
        java.io.IOException
      • finalize

        protected void finalize()
                         throws java.lang.Throwable
        Object.finalize() gets called when this object is GC'd. Overriding finalize is discouraged because if objects are created faster than finalizer threads can process the GC'd objects, then the system OOMs. We think it's safe in this scenario because we expect these Apache clients to be very infrequently constructed. Tritium 0.16.9 also has instrumentation to measure the size of the finalizer queue (https://github.com/palantir/tritium/pull/712).
        Overrides:
        finalize in class java.lang.Object
        Throws:
        java.lang.Throwable
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object