Class GenericURLStreamHandler


  • public class GenericURLStreamHandler
    extends java.net.URLStreamHandler

    GenericURLStreamHandler class.

    Customized URL stream handler creates dynamically created URL connections from customized URL protocols.
    Author:
    Christian Pape, Ronny Trommer
    • Constructor Summary

      Constructors 
      Constructor Description
      GenericURLStreamHandler​(java.lang.Class<? extends java.net.URLConnection> urlConnectionClass)
      GenericURLStreamHandler
      GenericURLStreamHandler​(java.lang.Class<? extends java.net.URLConnection> urlConnectionClass, int defaultPort)
      GenericURLStreamHandler
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected int getDefaultPort()
      protected java.net.URLConnection openConnection​(java.net.URL u)
      • 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
    • Constructor Detail

      • GenericURLStreamHandler

        public GenericURLStreamHandler​(java.lang.Class<? extends java.net.URLConnection> urlConnectionClass,
                                       int defaultPort)

        GenericURLStreamHandler

        Create URL stream handler with given class and customized default port.
        Parameters:
        urlConnectionClass - full qualified classname as String object.
        defaultPort - default port as Integer object.
      • GenericURLStreamHandler

        public GenericURLStreamHandler​(java.lang.Class<? extends java.net.URLConnection> urlConnectionClass)

        GenericURLStreamHandler

        Create URL stream handler with given class and default port -1.
        Parameters:
        urlConnectionClass - full qualified classname as String object.
    • Method Detail

      • getDefaultPort

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

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