Interface URLConnector

  • All Known Implementing Classes:
    HttpClient

    public interface URLConnector
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.io.InputStream connect​(java.net.URL url)
      Connect to the specified URL.
      TaggedData connectTagged​(java.net.URL url)
      Connect to the specified URL, also returning the ETag if available.
      TaggedData connectTagged​(java.net.URL url, java.lang.String tag)
      Connect to the specified URL while providing the last known tag for the remote resource; the response will be null if the remote resource is unchanged.
    • Method Detail

      • connect

        java.io.InputStream connect​(java.net.URL url)
                             throws java.io.IOException,
                                    java.lang.Exception
        Connect to the specified URL.
        Parameters:
        url -
        Throws:
        java.io.IOException
        java.lang.Exception
      • connectTagged

        TaggedData connectTagged​(java.net.URL url)
                          throws java.lang.Exception
        Connect to the specified URL, also returning the ETag if available.
        Parameters:
        url - The remote URL.
        Returns:
        An instance of TaggedData; note that the TaggedData.getTag() method may return null if the resource has no tag.
        Throws:
        java.io.IOException - @since 1.1
        java.lang.Exception
      • connectTagged

        TaggedData connectTagged​(java.net.URL url,
                                 java.lang.String tag)
                          throws java.lang.Exception
        Connect to the specified URL while providing the last known tag for the remote resource; the response will be null if the remote resource is unchanged.
        Parameters:
        url - The remote URL.
        tag - The last known tag value for the resource.
        Returns:
        An instance of TaggedData, or null if the resource has not modified (i.e., if it has the same tag value).
        Throws:
        java.io.IOException - @since 1.1
        java.lang.Exception