Class OkHttpValidatingClientFactory

java.lang.Object
com.janeirodigital.shapetrees.client.okhttp.OkHttpValidatingClientFactory

public class OkHttpValidatingClientFactory extends Object
Factory to provide OkHttpClient instances where shape tree validation is enabled. Clients are sourced from the OkHttpClientFactory configured by OkHttpClientFactoryManager.
See Also:
  • Method Details

    • get

      public static okhttp3.OkHttpClient get() throws ShapeTreeException
      Customized the basic OkHttpClient received from the configured OkHttpClientFactory with an interceptor to provide client-side shape tree validation. The returned client is a derivative of the one received by OkHttpClientFactory, which reuses the same connection pool, and thread pools, and adds shape tree validation to the existing configuration.
      Returns:
      Validating OkHttpClient
      Throws:
      ShapeTreeException