com.caucho.rewrite
Class IfLocalPort
java.lang.Object
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.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IfLocalPort
public IfLocalPort()
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