Class UrlConnectionFactory


  • public class UrlConnectionFactory
    extends java.lang.Object
    Constructs an HTTPURLConnection. This class should be considered to be internal
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String ALLOWED_PROTOCOLS  
      private static int connectTimeoutMillis  
      private static java.lang.String DEFAULT_ALLOWED_PROTOCOLS
      Default list of protocols that are allowed to be used for configuration files and other trusted resources.
      private static int DEFAULT_TIMEOUT  
      private static java.lang.String HTTP  
      private static java.lang.String HTTPS  
      private static java.lang.String JAR  
      private static java.lang.String JSON  
      private static java.lang.String NO_PROTOCOLS  
      private static java.lang.String PROPERTIES  
      private static int readTimeoutMillis  
      private static java.lang.String TEXT  
      private static java.lang.String XML  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.net.URLConnection createConnection​(java.net.URL url)  
      static <T extends java.net.URLConnection>
      T
      createConnection​(java.net.URL url, long lastModifiedMillis, SslConfiguration sslConfiguration, AuthorizationProvider authorizationProvider)  
      private static boolean isJson​(java.lang.String type)  
      private static boolean isProperties​(java.lang.String type)  
      private static boolean isXml​(java.lang.String type)  
      • Methods inherited from class java.lang.Object

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

      • DEFAULT_ALLOWED_PROTOCOLS

        private static final java.lang.String DEFAULT_ALLOWED_PROTOCOLS
        Default list of protocols that are allowed to be used for configuration files and other trusted resources.

        By default, we trust the following protocols:

        file
        Local files
        https
        Resources retrieved through TLS to guarantee their integrity
        jar
        Resources retrieved from JAR files
        resource
        Resources embedded in a GraalVM native image
      • ALLOWED_PROTOCOLS

        public static final java.lang.String ALLOWED_PROTOCOLS
        See Also:
        Constant Field Values
    • Constructor Detail

      • UrlConnectionFactory

        public UrlConnectionFactory()
    • Method Detail

      • createConnection

        public static <T extends java.net.URLConnection> T createConnection​(java.net.URL url,
                                                                            long lastModifiedMillis,
                                                                            SslConfiguration sslConfiguration,
                                                                            AuthorizationProvider authorizationProvider)
                                                                     throws java.io.IOException
        Throws:
        java.io.IOException
      • createConnection

        public static java.net.URLConnection createConnection​(java.net.URL url)
                                                       throws java.io.IOException
        Throws:
        java.io.IOException
      • isXml

        private static boolean isXml​(java.lang.String type)
      • isJson

        private static boolean isJson​(java.lang.String type)
      • isProperties

        private static boolean isProperties​(java.lang.String type)