Interface SubProtocolURLConnectionFactory

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.net.URLConnection create​(java.net.URL url, java.util.List<java.lang.String> subProtocols, java.net.Proxy proxy)
      Create the sub-protocols' URLConnection
      boolean supports​(java.net.URL url, java.util.List<java.lang.String> subProtocols)
      Supports the current factory to create the URLConnection or not
    • Method Detail

      • supports

        boolean supports​(java.net.URL url,
                         java.util.List<java.lang.String> subProtocols)
        Supports the current factory to create the URLConnection or not

        Parameters:
        url - the URL that this connects to
        subProtocols - the list of sub-protocols
        Returns:
        true if supports,otherwise false
      • create

        java.net.URLConnection create​(java.net.URL url,
                                      java.util.List<java.lang.String> subProtocols,
                                      java.net.Proxy proxy)
                               throws java.io.IOException
        Create the sub-protocols' URLConnection
        Parameters:
        url - the URL that this connects to
        subProtocols - the list of sub-protocols
        proxy - Proxy the proxy through which the connection will be made. If direct connection is desired, Proxy.NO_PROXY should be specified.
        Returns:
        URLConnection
        Throws:
        java.io.IOException - If the process is failed