org.ocpsoft.rewrite.servlet.config
Class Scheme
java.lang.Object
org.ocpsoft.rewrite.config.DefaultConditionBuilder
org.ocpsoft.rewrite.servlet.config.HttpCondition
org.ocpsoft.rewrite.servlet.config.Scheme
- All Implemented Interfaces:
- Condition, ConditionBuilder, ConfigurationElement, Parameterized<IScheme,IScheme.SchemeParameter,String>, IScheme
public class Scheme
- extends HttpCondition
- implements IScheme
A Condition that inspects the value of ServletRequest.getScheme()
- Author:
- Lincoln Baxter, III
matches
public static Scheme matches(String pattern)
- Inspect the current request scheme, comparing against the given pattern.
The given pattern may be parameterized using the following format:
https
{scheme}
{scheme}-custom
... and so on
By default, matching parameter values are bound to the EvaluationContext. See
also where(String)
where
public IScheme.SchemeParameter where(String param)
- Specified by:
where in interface Parameterized<IScheme,IScheme.SchemeParameter,String>
where
public IScheme.SchemeParameter where(String param,
Binding binding)
- Specified by:
where in interface Parameterized<IScheme,IScheme.SchemeParameter,String>
evaluateHttp
public boolean evaluateHttp(HttpServletRewrite event,
EvaluationContext context)
- Specified by:
evaluateHttp in class HttpCondition
getExpression
public ParameterizedPatternParser getExpression()
- Get the underlying
RegexParameterizedPatternBuilder for this Scheme
See also: where(String)
toString
public String toString()
- Overrides:
toString in class Object
Copyright © 2012 OCPsoft. All Rights Reserved.