public abstract class AbstractRuleKey extends Object implements RuleKey
Modifier and Type | Field and Description |
---|---|
protected Pattern |
pathPattern |
protected boolean |
pathRegExp |
protected int |
port
-1 is used as a wildcard.
|
protected boolean |
usePathPattern |
Constructor and Description |
---|
AbstractRuleKey(int port) |
Modifier and Type | Method and Description |
---|---|
String |
getHost() |
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()
When isHostWidldcard is set to true any value of the HTTP Host header will match.
|
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 |
matchesPath(String path) |
void |
setPath(String path) |
void |
setPathRegExp(boolean pathRegExp) |
void |
setPort(int port) |
void |
setUsePathPattern(boolean usePathPattern) |
protected int port
protected Pattern pathPattern
protected boolean pathRegExp
protected boolean usePathPattern
public String getHost()
public String getMethod()
RuleKey
public int getPort()
RuleKey
public boolean isHostWildcard()
RuleKey
isHostWildcard
in interface RuleKey
public boolean isMethodWildcard()
RuleKey
isMethodWildcard
in interface RuleKey
public void setPort(int port)
public boolean isPathRegExp()
RuleKey
isPathRegExp
in interface RuleKey
public void setPathRegExp(boolean pathRegExp)
setPathRegExp
in interface RuleKey
public boolean isUsePathPattern()
isUsePathPattern
in interface RuleKey
public void setUsePathPattern(boolean usePathPattern)
setUsePathPattern
in interface RuleKey
public String getPath()
RuleKey
public boolean matchesPath(String path)
matchesPath
in interface RuleKey
Copyright © 2012. All Rights Reserved.