rewrite-config-servlet 2.0.0.Alpha2

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

java.lang.Object
  extended by org.ocpsoft.rewrite.servlet.config.rule.CDN
All Implemented Interfaces:
Condition, ConditionBuilder, ConfigurationElement, Operation, Rule, Parameterized<ICDN,ICDN.CDNParameter,String>, ICDN

public class CDN
extends Object
implements ICDN

Rule that creates a bi-directional rewrite rule between an externally facing URL and an internal server resource URL

Author:
Lincoln Baxter, III

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.ocpsoft.rewrite.servlet.config.rule.ICDN
ICDN.CDNParameter, ICDN.ICDNParameter
 
Constructor Summary
protected CDN(String pattern)
           
 
Method Summary
 ConditionBuilder and(Condition condition)
           
 ConditionBuilder andNot(Condition condition)
           
 boolean evaluate(Rewrite event, EvaluationContext context)
           
 String getId()
           
 ParameterizedPatternParser getLocationExpression()
           
 ParameterizedPatternParser getResourcExpression()
           
 ConditionBuilder or(Condition condition)
           
 ConditionBuilder orNot(Condition condition)
           
 ICDN perform(Operation operation)
          Define additional Operation instances to be performed when this rule matches successfully.
 void perform(Rewrite event, EvaluationContext context)
           
static ICDN relocate(String pattern)
          The outward facing URL path to which this CDN will apply.
 ICDN to(String location)
          The new resource (real or virtual) to be served, either from a local context or remote CDN.
 String toString()
           
 ICDN when(Condition condition)
          Define additional Condition instances that must be satisfied in order for this rule to match successfully.
 ICDN.CDNParameter where(String parameter)
           
 ICDN.CDNParameter where(String param, Binding binding)
           
 ICDN withId(String id)
          Set the ID of this Join.
 
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 ICDN relocate(String pattern)
The outward facing URL path to which this CDN will apply.


to

public ICDN to(String location)
Description copied from interface: ICDN
The new resource (real or virtual) to be served, either from a local context or remote CDN.

Specified by:
to in interface ICDN

evaluate

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

perform

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

where

public ICDN.CDNParameter where(String parameter)
Specified by:
where in interface Parameterized<ICDN,ICDN.CDNParameter,String>

where

public ICDN.CDNParameter where(String param,
                               Binding binding)
Specified by:
where in interface Parameterized<ICDN,ICDN.CDNParameter,String>

getId

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

when

public ICDN when(Condition condition)
Description copied from interface: ICDN
Define additional Condition instances that must be satisfied in order for this rule to match successfully.

Specified by:
when in interface ICDN

perform

public ICDN perform(Operation operation)
Description copied from interface: ICDN
Define additional Operation instances to be performed when this rule matches successfully.

Specified by:
perform in interface ICDN

withId

public ICDN withId(String id)
Description copied from interface: ICDN
Set the ID of this Join.

Specified by:
withId in interface ICDN

toString

public String toString()
Overrides:
toString in class Object

and

public ConditionBuilder and(Condition condition)
Specified by:
and in interface ConditionBuilder

andNot

public ConditionBuilder andNot(Condition condition)
Specified by:
andNot in interface ConditionBuilder

or

public ConditionBuilder or(Condition condition)
Specified by:
or in interface ConditionBuilder

orNot

public ConditionBuilder orNot(Condition condition)
Specified by:
orNot in interface ConditionBuilder

getLocationExpression

public ParameterizedPatternParser getLocationExpression()
Specified by:
getLocationExpression in interface ICDN

getResourcExpression

public ParameterizedPatternParser getResourcExpression()
Specified by:
getResourcExpression in interface ICDN

rewrite-config-servlet 2.0.0.Alpha2

Copyright © 2012 OCPsoft. All Rights Reserved.