Class TokenStreamProvider

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected javax.net.ssl.SSLSocketFactory getSocketFactory()
      Returns the SSL socket factory.
      java.io.InputStream openStream​(java.lang.String url, java.util.Map<java.lang.String,​java.lang.String> headers, int connectTimeout, int readTimeout)
      Opens an input stream to the specified URL.
      protected void setToken​(java.lang.String token)
      Sets the bearer token for authentication.
      • Methods inherited from class java.lang.Object

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

      • setToken

        protected void setToken​(java.lang.String token)
        Sets the bearer token for authentication.
        Parameters:
        token - the bearer token
      • openStream

        public java.io.InputStream openStream​(java.lang.String url,
                                              java.util.Map<java.lang.String,​java.lang.String> headers,
                                              int connectTimeout,
                                              int readTimeout)
                                       throws java.io.IOException
        Description copied from class: AbstractStreamProvider
        Opens an input stream to the specified URL.
        Specified by:
        openStream in interface StreamProvider
        Overrides:
        openStream in class AbstractStreamProvider
        Parameters:
        url - the url
        headers - the headers map
        connectTimeout - connection timeout in ms
        readTimeout - read timeout in ms
        Returns:
        the input stream
        Throws:
        java.io.IOException - when an error occurs