Class OkHttpFactory

  • All Implemented Interfaces:
    java.util.function.Supplier

    
    public final class OkHttpFactory
     implements Supplier<OkHttpClient>
                        

    Lazily creates and caches an OkHttpClient object.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final <Error class: unknown class> getOkHttp()
      final Boolean getLogging() When set to true, turns on body level logging.
      final Consumer<OkHttpClient.Builder> getOkHttpConfigurator() Provide this if you wish to customize the http client (e.g.
      <Error class: unknown class> get()
      • Methods inherited from class java.lang.Object

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

      • OkHttpFactory

        OkHttpFactory(Boolean logging, Consumer<OkHttpClient.Builder> okHttpConfigurator)
      • OkHttpFactory

        OkHttpFactory(Boolean logging)
      • OkHttpFactory

        OkHttpFactory()
    • Method Detail

      • getOkHttp

         final <Error class: unknown class> getOkHttp()
      • getLogging

         final Boolean getLogging()

        When set to true, turns on body level logging.

      • getOkHttpConfigurator

         final Consumer<OkHttpClient.Builder> getOkHttpConfigurator()

        Provide this if you wish to customize the http client (e.g. proxy, timeout, certificate/auth settings)

      • get

         <Error class: unknown class> get()