org.duelengine.duel
Class CDNLinkInterceptor

java.lang.Object
  extended by org.duelengine.duel.CDNLinkInterceptor
All Implemented Interfaces:
LinkInterceptor

public class CDNLinkInterceptor
extends Object
implements LinkInterceptor


Constructor Summary
CDNLinkInterceptor(String cdnHost, Map<String,String> cdnMap, boolean isDevMode)
           
CDNLinkInterceptor(String cdnHost, ResourceBundle cdnBundle, boolean isDevMode)
           
 
Method Summary
 String transformURL(String url)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CDNLinkInterceptor

public CDNLinkInterceptor(String cdnHost,
                          ResourceBundle cdnBundle,
                          boolean isDevMode)
                   throws URISyntaxException
Parameters:
cdnHost - the CDN server hostname (e.g., "cdn.example.com")
cdnMap - a mapping of paths to their compacted form (e.g., "/foo.js" => "/foo.min.js")
isDevMode - uses normal paths unless compacted form has a dev form (e.g., "/foo.js" => "/foo.min.js" => "/foo.test.js", else "/foo.js")
Throws:
URISyntaxException

CDNLinkInterceptor

public CDNLinkInterceptor(String cdnHost,
                          Map<String,String> cdnMap,
                          boolean isDevMode)
                   throws URISyntaxException
Parameters:
cdnHost - the CDN server hostname (e.g., "cdn.example.com")
cdnMap - a mapping of paths to their compacted form (e.g., "/foo.js" => "/foo.min.js")
isDevMode - uses normal paths unless compacted form has a dev form (e.g., "/foo.js" => "/foo.min.js" => "/foo.test.js", else "/foo.js")
Throws:
URISyntaxException
Method Detail

transformURL

public String transformURL(String url)
Specified by:
transformURL in interface LinkInterceptor


Copyright © 2011. All Rights Reserved.