Class DefaultConnectionFactory

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.net.Proxy proxy  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.net.HttpURLConnection openConnection​(java.net.URL url)
      Creates a new HttpURLConnection from the given url.
      • Methods inherited from class java.lang.Object

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

      • proxy

        private final java.net.Proxy proxy
    • Constructor Detail

      • DefaultConnectionFactory

        public DefaultConnectionFactory()
      • DefaultConnectionFactory

        public DefaultConnectionFactory​(java.net.Proxy proxy)
        Parameters:
        proxy - HTTP proxy or null to use the proxy settings from system properties
    • Method Detail

      • openConnection

        public java.net.HttpURLConnection openConnection​(java.net.URL url)
                                                  throws java.io.IOException
        Description copied from interface: ConnectionFactory
        Creates a new HttpURLConnection from the given url.
        Specified by:
        openConnection in interface ConnectionFactory
        Parameters:
        url - the URL to which the conneciton will be made
        Returns:
        the created connection object, which will still be in the pre-connected state
        Throws:
        java.io.IOException - if there was a problem producing the connection