Package com.predic8.membrane.core.rules
Class AbstractRuleKey
java.lang.Object
com.predic8.membrane.core.rules.AbstractRuleKey
- All Implemented Interfaces:
RuleKey
- Direct Known Subclasses:
ProxyRuleKey,ServiceProxyKey
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancomplexMatch(Exchange exc) getHost()getIp()IP address to bind to, or null to bind to 0.0.0.0 (=any local address).Returns the name of the HTTP methodgetPath()Returns the request URI.booleanintgetPort()Returns the TCP port that receives the messagesbooleanbooleanWhen isMethodWildcard is set to true any value of the HTTP Host header will matchbooleanIf isPathRegExp is true, than the path will be treated as a regexp pattern.booleanbooleanmatchesHostHeader(String hostHeader) booleanmatchesPath(String path) booleanmatchesVersion(String version) voidvoidvoidsetPathRegExp(boolean pathRegExp) voidsetPort(int port) voidsetUsePathPattern(boolean usePathPattern)
-
Field Details
-
port
protected int port-1 is used as a wildcard. It is used by HttpServletHandler, since its port is determined by the webserver and not by the proxies.xml -
pathPattern
-
pathRegExp
protected boolean pathRegExp -
usePathPattern
protected boolean usePathPattern -
ip
-
-
Constructor Details
-
AbstractRuleKey
-
AbstractRuleKey
-
-
Method Details
-
getHost
-
getMethod
Description copied from interface:RuleKeyReturns the name of the HTTP method -
getPort
public int getPort()Description copied from interface:RuleKeyReturns the TCP port that receives the messages -
isHostWildcard
public boolean isHostWildcard() -
isMethodWildcard
public boolean isMethodWildcard()Description copied from interface:RuleKeyWhen isMethodWildcard is set to true any value of the HTTP Host header will match- Specified by:
isMethodWildcardin interfaceRuleKey- Returns:
- true if HTTP method wildcard is set to true false otherwise
-
setPort
public void setPort(int port) -
isPathRegExp
public boolean isPathRegExp()Description copied from interface:RuleKeyIf isPathRegExp is true, than the path will be treated as a regexp pattern. The path of the incoming request will be match against this regexp.return true if a path is an regexp expression false otherwise
- Specified by:
isPathRegExpin interfaceRuleKey
-
getPathRegExp
public boolean getPathRegExp() -
setPathRegExp
public void setPathRegExp(boolean pathRegExp) - Specified by:
setPathRegExpin interfaceRuleKey
-
isUsePathPattern
public boolean isUsePathPattern()- Specified by:
isUsePathPatternin interfaceRuleKey
-
setUsePathPattern
public void setUsePathPattern(boolean usePathPattern) - Specified by:
setUsePathPatternin interfaceRuleKey
-
setPath
-
getPath
Description copied from interface:RuleKeyReturns the request URI. For the request GET index.html it is index.html -
matchesPath
- Specified by:
matchesPathin interfaceRuleKey
-
getIp
Description copied from interface:RuleKeyIP address to bind to, or null to bind to 0.0.0.0 (=any local address). -
setIp
-
matchesHostHeader
- Specified by:
matchesHostHeaderin interfaceRuleKey
-
matchesVersion
- Specified by:
matchesVersionin interfaceRuleKey
-
complexMatch
- Specified by:
complexMatchin interfaceRuleKey
-