Class JdkHttpURLConnection


  • public class JdkHttpURLConnection
    extends Object
    Perform a HTTP GET to a URL. We have this as a separate class so we can mock it in our tests.
    • Constructor Detail

      • JdkHttpURLConnection

        public JdkHttpURLConnection()
    • Method Detail

      • connect

        public void connect​(String url,
                            String username,
                            String password,
                            int timeout,
                            Logger logger)
                     throws IOException
        Connect to given URL as an HTTP GET request.
        Parameters:
        url - URL to connect to.
        username - Username (optional, can be null)
        password - Password (optional, can be null)
        timeout - Connection timeout (optional, can be 0)
        logger - Codehaus Cargo logger to use
        Throws:
        IOException - If connecting to the JBoss server fails