com.caucho.rewrite
Class IfLocalPort

java.lang.Object
  extended by com.caucho.rewrite.IfLocalPort
All Implemented Interfaces:
RequestPredicate

@Configurable
public class IfLocalPort
extends java.lang.Object
implements RequestPredicate

Matches if request.getLocalPort() matches the 'value' attribute.

 <resin:Allow url-pattern="/admin/*">
                  xmlns:resin="urn:java:com.caucho.resin">
   <resin:IfLocalPort value="8080"/>
 </resin:Allow>
 

RequestPredicates may be used for security and rewrite actions.


Constructor Summary
IfLocalPort()
           
 
Method Summary
 void init()
           
 boolean isMatch(HttpServletRequest request)
          True if the predicate matches.
 void setValue(int value)
          Sets the local port to compare
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IfLocalPort

public IfLocalPort()
Method Detail

setValue

@Configurable
public void setValue(int value)
Sets the local port to compare


init

@PostConstruct
public void init()

isMatch

public boolean isMatch(HttpServletRequest request)
True if the predicate matches.

Specified by:
isMatch in interface RequestPredicate
Parameters:
request - the servlet request to test