Class HttpURLConnectionManager


  • public class HttpURLConnectionManager
    extends Object
    The HttpURLConnectionManager class is used to get HttpURLConnection instances and set read as well as connect timeout
    Author:
    Bernhard Thalmayr
    • Constructor Detail

      • HttpURLConnectionManager

        public HttpURLConnectionManager()
    • Method Detail

      • getConnection

        public static HttpURLConnection getConnection​(URL url)
                                               throws IOException
        Get the HttpURLConnection and set read and connect timeout
        Parameters:
        url - The URL to open connection with
        Returns:
        A HttpURLConnection.
        Throws:
        IOException - when calling URL.openConnection fails
      • getReadTimeout

        public static int getReadTimeout()
      • getConnectTimeout

        public static int getConnectTimeout()