public class CDNResource extends RemappedResource
Resource implementation can be used as a marker class to signal the custom ResourceHandler
 such as CombinedResourceHandler that the given resource actually returns a CDN URL, and offers a method to
 return the local URL which can be used as fallback in case the CDN request errors out.COMPONENT_RESOURCE_KEY| Constructor and Description | 
|---|
| CDNResource()Do not use this constructor. | 
| CDNResource(Resource resource,
           String cdnURL)Constructs a new CDN resource which remaps the given wrapped resource to the given CDN URL. | 
| Modifier and Type | Method and Description | 
|---|---|
| String | getLocalRequestPath()Returns the local URL. | 
| String | getRequestPath()Returns the CDN URL. | 
equals, getContentType, getInputStream, getLibraryName, getResourceName, getResponseHeaders, getURL, getWrapped, hashCode, readExternal, userAgentNeedsUpdate, writeExternalsetContentType, setLibraryName, setResourceNamepublic CDNResource()
Externalizable.public CDNResource(Resource resource, String cdnURL)
getRequestPath().
 The local URL is available by getLocalRequestPath().resource - The resource to be remapped.cdnURL - The CDN URL of the resource.public String getRequestPath()
getRequestPath in class RemappedResourcepublic String getLocalRequestPath()
Copyright © 2012–2020 OmniFaces. All rights reserved.