Class NoExpectContinueHttpClientFactory

java.lang.Object
org.geotools.http.AbstractHTTPClientFactory
org.tailormap.api.geotools.http.NoExpectContinueHttpClientFactory
All Implemented Interfaces:
org.geotools.http.HTTPClientFactory

public class NoExpectContinueHttpClientFactory extends org.geotools.http.AbstractHTTPClientFactory
GeoTools HTTP client factory that uses NoExpectContinueHttpClient instead of MultithreadedHttpClient. Registered as a service in META-INF/services/org.geotools.http.HTTPClientFactory and made the default by setting the Hints.HTTP_CLIENT_FACTORY hint in GeoToolsConfiguration.

Without the hint, GeoTools creates a SimpleHttpClient (from DefaultHTTPClientFactory) unless a behavior such as HTTPConnectionPooling is requested, which the WFS datastore does. Because the hint makes this factory handle all requests, it does the same: it only creates the pooled NoExpectContinueHttpClient when SimpleHttpClient doesn't support a requested behavior. SimpleHttpClient doesn't send Expect: 100-continue, applies its connect timeout (the pooled client ignores setConnectTimeout() in GeoTools 35.2) and doesn't need to be closed, so code that uses the default client such as WMS/WMTS capabilities loading doesn't change.

  • Constructor Details

    • NoExpectContinueHttpClientFactory

      public NoExpectContinueHttpClientFactory()
  • Method Details

    • clientClasses

      public List<Class<?>> clientClasses()
      Specified by:
      clientClasses in class org.geotools.http.AbstractHTTPClientFactory
    • createClient

      public org.geotools.http.HTTPClient createClient(List<Class<? extends org.geotools.http.HTTPBehavior>> behaviors)
      Specified by:
      createClient in interface org.geotools.http.HTTPClientFactory
      Specified by:
      createClient in class org.geotools.http.AbstractHTTPClientFactory
    • createLogging

      protected org.geotools.http.HTTPClient createLogging(org.geotools.http.HTTPClient client)
      Overrides:
      createLogging in class org.geotools.http.AbstractHTTPClientFactory