Class HttpUrlHandler

  • Direct Known Subclasses:
    HttpsUrlHandler

    public class HttpUrlHandler
    extends java.net.URLStreamHandler
    The class for handling HTTP URL Connection using Apache HTTP Client
    Author:
    Alejandro Galue
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String HTTP
      The Constant PROTOCOL.
    • Constructor Summary

      Constructors 
      Constructor Description
      HttpUrlHandler​(Request request)
      Instantiates a new HTTP URL handler.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected int getDefaultPort()  
      protected java.net.URLConnection openConnection​(java.net.URL url)  
      • Methods inherited from class java.net.URLStreamHandler

        equals, getHostAddress, hashCode, hostsEqual, openConnection, parseURL, sameFile, setURL, setURL, toExternalForm
      • Methods inherited from class java.lang.Object

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

    • Constructor Detail

      • HttpUrlHandler

        public HttpUrlHandler​(Request request)
        Instantiates a new HTTP URL handler.
        Parameters:
        request - the request
    • Method Detail

      • getDefaultPort

        protected int getDefaultPort()
        Overrides:
        getDefaultPort in class java.net.URLStreamHandler
      • openConnection

        protected java.net.URLConnection openConnection​(java.net.URL url)
                                                 throws java.io.IOException
        Specified by:
        openConnection in class java.net.URLStreamHandler
        Throws:
        java.io.IOException