rewrite-config-servlet 2.0.0.Beta3

org.ocpsoft.rewrite.servlet.config.rule
Class CDN

java.lang.Object
  extended by org.ocpsoft.rewrite.servlet.config.rule.CDN
All Implemented Interfaces:
Condition, Operation, Rule, Parameterized, CDNRelocate

public class CDN
extends Object
implements Rule, CDNRelocate, Parameterized

A Rule that creates a bi-directional relationship between an externally facing Address and an internal server resource Address for the purposes of using a Content Distribution Network.

Author:
Lincoln Baxter, III

Constructor Summary
protected CDN(String pattern)
           
 
Method Summary
 boolean evaluate(Rewrite event, EvaluationContext context)
           
 String getId()
           
 ParameterizedPatternParser getLocationExpression()
           
 Set<String> getRequiredParameterNames()
           
 ParameterizedPatternParser getResourcExpression()
           
 void perform(Rewrite event, EvaluationContext context)
           
static CDNRelocate relocate(String pattern)
          Create a Rule specifying the outward facing Path to which this CDN will apply.
 void setId(String id)
          Set the id of this Rule
 void setParameterStore(ParameterStore store)
           
 CDN to(String location)
          The new resource Address to serve as an external Substitute for the configured internal resource Path.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CDN

protected CDN(String pattern)
Method Detail

relocate

public static CDNRelocate relocate(String pattern)
Create a Rule specifying the outward facing Path to which this CDN will apply. See Path for additional configuration details.


to

public CDN to(String location)
Description copied from interface: CDNRelocate
The new resource Address to serve as an external Substitute for the configured internal resource Path. See Substitute for additional configuration details.

Specified by:
to in interface CDNRelocate

evaluate

public boolean evaluate(Rewrite event,
                        EvaluationContext context)
Specified by:
evaluate in interface Condition

perform

public void perform(Rewrite event,
                    EvaluationContext context)
Specified by:
perform in interface Operation

getId

public String getId()
Specified by:
getId in interface Rule

setId

public void setId(String id)
Set the id of this Rule


toString

public String toString()
Overrides:
toString in class Object

getLocationExpression

public ParameterizedPatternParser getLocationExpression()

getResourcExpression

public ParameterizedPatternParser getResourcExpression()

getRequiredParameterNames

public Set<String> getRequiredParameterNames()
Specified by:
getRequiredParameterNames in interface Parameterized

setParameterStore

public void setParameterStore(ParameterStore store)
Specified by:
setParameterStore in interface Parameterized

rewrite-config-servlet 2.0.0.Beta3

Copyright © 2013 OCPsoft. All Rights Reserved.