Class HttpUrlConnectorProvider.DefaultConnectionFactory

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.net.HttpURLConnection getConnection​(java.net.URL url)
      Get a HttpURLConnection for a given URL.
      • Methods inherited from class java.lang.Object

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

      • DefaultConnectionFactory

        private DefaultConnectionFactory()
    • Method Detail

      • getConnection

        public java.net.HttpURLConnection getConnection​(java.net.URL url)
                                                 throws java.io.IOException
        Description copied from interface: HttpUrlConnectorProvider.ConnectionFactory
        Get a HttpURLConnection for a given URL.

        Implementation of the method MUST be thread-safe and MUST ensure that a dedicated HttpURLConnection instance is returned for concurrent requests.

        Specified by:
        getConnection in interface HttpUrlConnectorProvider.ConnectionFactory
        Parameters:
        url - the endpoint URL.
        Returns:
        the HttpURLConnection.
        Throws:
        java.io.IOException - in case the connection cannot be provided.