Package 

Interface CDN


  • 
    public interface CDN
    
                        

    Class defining a CDN (Content Delivery Network) interface. Override to transform requests loading images/files from the custom CDN.

    • Method Summary

      Modifier and Type Method Description
      CDNRequest imageRequest(String url) Transforms a request for loading an image from the CDN.
      CDNRequest fileRequest(String url) Transforms a request for loading a non-image file from the CDN.
      • Methods inherited from class java.lang.Object

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

      • imageRequest

         CDNRequest imageRequest(String url)

        Transforms a request for loading an image from the CDN.

        Implementations that perform blocking or network I/O must use withContext to switch to the appropriate dispatcher (e.g. Dispatchers.IO).

        Parameters:
        url - Original CDN url for the image.
      • fileRequest

         CDNRequest fileRequest(String url)

        Transforms a request for loading a non-image file from the CDN.

        Implementations that perform blocking or network I/O must use withContext to switch to the appropriate dispatcher (e.g. Dispatchers.IO).

        Parameters:
        url - Original CDN url for the file.