java.lang.Object
com.predic8.membrane.core.exchange.snapshots.FakeKey
All Implemented Interfaces:
RuleKey

public class FakeKey extends Object implements RuleKey
  • Constructor Details

    • FakeKey

      public FakeKey(int port)
  • Method Details

    • getPort

      public int getPort()
      Description copied from interface: RuleKey
      Returns the TCP port that receives the messages
      Specified by:
      getPort in interface RuleKey
      Returns:
      an integer value which corresponds to TCP port
    • getMethod

      public String getMethod()
      Description copied from interface: RuleKey
      Returns the name of the HTTP method
      Specified by:
      getMethod in interface RuleKey
      Returns:
      a String specifying the name of the HTTP method
    • getPath

      public String getPath()
      Description copied from interface: RuleKey
      Returns the request URI. For the request GET index.html it is index.html
      Specified by:
      getPath in interface RuleKey
      Returns:
      a String specifying the request URI
    • getHost

      public String getHost()
      Specified by:
      getHost in interface RuleKey
      Returns:
      the value of the HTTP Host header field
    • isMethodWildcard

      public boolean isMethodWildcard()
      Description copied from interface: RuleKey
      When isMethodWildcard is set to true any value of the HTTP Host header will match
      Specified by:
      isMethodWildcard in interface RuleKey
      Returns:
      true if HTTP method wildcard is set to true false otherwise
    • isPathRegExp

      public boolean isPathRegExp()
      Description copied from interface: RuleKey
      If 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:
      isPathRegExp in interface RuleKey
    • isUsePathPattern

      public boolean isUsePathPattern()
      Specified by:
      isUsePathPattern in interface RuleKey
    • setUsePathPattern

      public void setUsePathPattern(boolean usePathPattern)
      Specified by:
      setUsePathPattern in interface RuleKey
    • setPathRegExp

      public void setPathRegExp(boolean pathRegExp)
      Specified by:
      setPathRegExp in interface RuleKey
    • setPath

      public void setPath(String path)
      Specified by:
      setPath in interface RuleKey
    • matchesPath

      public boolean matchesPath(String path)
      Specified by:
      matchesPath in interface RuleKey
    • getIp

      public String getIp()
      Description copied from interface: RuleKey
      IP address to bind to, or null to bind to 0.0.0.0 (=any local address).
      Specified by:
      getIp in interface RuleKey
    • setIp

      public void setIp(String ip)
      Specified by:
      setIp in interface RuleKey
    • matchesHostHeader

      public boolean matchesHostHeader(String hostHeader)
      Specified by:
      matchesHostHeader in interface RuleKey
    • matchesVersion

      public boolean matchesVersion(String version)
      Specified by:
      matchesVersion in interface RuleKey
    • complexMatch

      public boolean complexMatch(Exchange exc)
      Specified by:
      complexMatch in interface RuleKey