public abstract class AbstractRuleKey extends Object implements RuleKey
| Modifier and Type | Field and Description |
|---|---|
protected String |
ip |
protected Pattern |
pathPattern |
protected boolean |
pathRegExp |
protected int |
port
-1 is used as a wildcard.
|
protected boolean |
usePathPattern |
| Constructor and Description |
|---|
AbstractRuleKey(int port,
String ip) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
complexMatch(String hostHeader,
String method,
String uri,
String version,
int port,
String localIP) |
String |
getHost() |
String |
getIp()
IP address to bind to, or null to bind to 0.0.0.0 (=any local address).
|
String |
getMethod()
Returns the name of the HTTP method
|
String |
getPath()
Returns the request URI.
|
int |
getPort()
Returns the TCP port that receives the messages
|
boolean |
isHostWildcard() |
boolean |
isMethodWildcard()
When isMethodWildcard is set to true any value of the HTTP Host header will match
|
boolean |
isPathRegExp()
If isPathRegExp is true, than the path will be treated as a regexp pattern.
|
boolean |
isUsePathPattern() |
boolean |
matchesHostHeader(String hostHeader) |
boolean |
matchesPath(String path) |
boolean |
matchesVersion(String version) |
void |
setIp(String ip) |
void |
setPath(String path) |
void |
setPathRegExp(boolean pathRegExp) |
void |
setPort(int port) |
void |
setUsePathPattern(boolean usePathPattern) |
protected int port
protected volatile Pattern pathPattern
protected boolean pathRegExp
protected boolean usePathPattern
protected String ip
public AbstractRuleKey(int port,
String ip)
public String getHost()
public String getMethod()
RuleKeypublic int getPort()
RuleKeypublic boolean isHostWildcard()
public boolean isMethodWildcard()
RuleKeyisMethodWildcard in interface RuleKeypublic void setPort(int port)
public boolean isPathRegExp()
RuleKeyreturn true if a path is an regexp expression false otherwise
isPathRegExp in interface RuleKeypublic void setPathRegExp(boolean pathRegExp)
setPathRegExp in interface RuleKeypublic boolean isUsePathPattern()
isUsePathPattern in interface RuleKeypublic void setUsePathPattern(boolean usePathPattern)
setUsePathPattern in interface RuleKeypublic String getPath()
RuleKeypublic boolean matchesPath(String path)
matchesPath in interface RuleKeypublic String getIp()
RuleKeypublic boolean matchesHostHeader(String hostHeader)
matchesHostHeader in interface RuleKeypublic boolean matchesVersion(String version)
matchesVersion in interface RuleKeyCopyright © 2021. All Rights Reserved.