rewrite-impl-servlet 1.0.4.Final

org.ocpsoft.rewrite.servlet.config
Class Scheme

java.lang.Object
  extended by org.ocpsoft.rewrite.config.DefaultConditionBuilder
      extended by org.ocpsoft.rewrite.servlet.config.HttpCondition
          extended by 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

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.ocpsoft.rewrite.servlet.config.IScheme
IScheme.ISchemeParameter, IScheme.SchemeParameter
 
Method Summary
 boolean evaluateHttp(HttpServletRewrite event, EvaluationContext context)
           
 ParameterizedPattern getExpression()
          Get the underlying ParameterizedPattern for this Scheme
static Scheme matches(String pattern)
          Inspect the current request scheme, comparing against the given pattern.
 String toString()
           
 IScheme.SchemeParameter where(String param)
           
 IScheme.SchemeParameter where(String param, Binding binding)
           
 
Methods inherited from class org.ocpsoft.rewrite.servlet.config.HttpCondition
evaluate
 
Methods inherited from class org.ocpsoft.rewrite.config.DefaultConditionBuilder
and, andNot, create, or, orNot, wrap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.ocpsoft.rewrite.config.ConditionBuilder
and, andNot, or, orNot
 
Methods inherited from interface org.ocpsoft.rewrite.config.Condition
evaluate
 

Method Detail

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 ParameterizedPattern getExpression()
Get the underlying ParameterizedPattern for this Scheme

See also: where(String)


toString

public String toString()
Overrides:
toString in class Object

rewrite-impl-servlet 1.0.4.Final

Copyright © 2012 OCPsoft. All Rights Reserved.