Package com.predic8.membrane.core.rules
Class ServiceProxyKey
java.lang.Object
com.predic8.membrane.core.rules.AbstractRuleKey
com.predic8.membrane.core.rules.ServiceProxyKey
- All Implemented Interfaces:
RuleKey
- Direct Known Subclasses:
APIProxyKey,SwaggerProxyKey
-
Field Summary
Fields inherited from class com.predic8.membrane.core.rules.AbstractRuleKey
ip, pathPattern, pathRegExp, port, usePathPattern -
Constructor Summary
ConstructorsConstructorDescriptionServiceProxyKey(int port) ServiceProxyKey(int port, String ip) ServiceProxyKey(RuleKey key) ServiceProxyKey(String host, String method, String path, int port) ServiceProxyKey(String host, String method, String path, int port, String ip) -
Method Summary
Modifier and TypeMethodDescriptionstatic StringcreateHostPattern(String host) booleangetHost()The pattern used to match the host name, or null if any host name matches.Returns the name of the HTTP methodinthashCode()booleanbooleanWhen isMethodWildcard is set to true any value of the HTTP Host header will matchbooleanmatchesHostHeader(String hostHeader) voidvoidtoString()Methods inherited from class com.predic8.membrane.core.rules.AbstractRuleKey
complexMatch, getIp, getPath, getPathRegExp, getPort, isPathRegExp, isUsePathPattern, matchesPath, matchesVersion, setIp, setPath, setPathRegExp, setPort, setUsePathPattern
-
Constructor Details
-
ServiceProxyKey
-
ServiceProxyKey
public ServiceProxyKey(int port) -
ServiceProxyKey
-
ServiceProxyKey
-
ServiceProxyKey
-
-
Method Details
-
getMethod
Description copied from interface:RuleKeyReturns the name of the HTTP method- Specified by:
getMethodin interfaceRuleKey- Overrides:
getMethodin classAbstractRuleKey- Returns:
- a String specifying the name of the HTTP method
-
setMethod
-
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- Overrides:
isMethodWildcardin classAbstractRuleKey- Returns:
- true if HTTP method wildcard is set to true false otherwise
-
isHostWildcard
public boolean isHostWildcard()- Overrides:
isHostWildcardin classAbstractRuleKey
-
toString
-
hashCode
public int hashCode() -
equals
-
getHost
- Specified by:
getHostin interfaceRuleKey- Overrides:
getHostin classAbstractRuleKey- Returns:
- the value of the HTTP Host header field
-
setHost
-
createHostPattern
-
matchesHostHeader
- Specified by:
matchesHostHeaderin interfaceRuleKey- Overrides:
matchesHostHeaderin classAbstractRuleKey
-
getHostPattern
The pattern used to match the host name, or null if any host name matches.
-