Package org.mockserver.matchers
Class AbstractHttpRequestMatcher
- java.lang.Object
-
- org.mockserver.model.ObjectWithReflectiveEqualsHashCodeToString
-
- org.mockserver.matchers.NotMatcher<RequestDefinition>
-
- org.mockserver.matchers.AbstractHttpRequestMatcher
-
- All Implemented Interfaces:
HttpRequestMatcher,Matcher<RequestDefinition>
- Direct Known Subclasses:
BinaryRequestPropertiesMatcher,DnsRequestPropertiesMatcher,HttpRequestPropertiesMatcher,HttpRequestsPropertiesMatcher
public abstract class AbstractHttpRequestMatcher extends NotMatcher<RequestDefinition> implements HttpRequestMatcher
-
-
Field Summary
Fields Modifier and Type Field Description protected static StringBECAUSEprotected static StringCOLON_NEW_LINESprotected Configurationconfigurationprotected booleancontrolPlaneMatcherprotected static StringDID_NOT_MATCHprotected StringdidNotMatchExpectationBecauseprotected StringdidNotMatchExpectationWithoutBecauseprotected StringdidNotMatchRequestBecauseprotected Expectationexpectationprotected static StringEXPECTATIONprotected static StringEXPECTATION_DID_MATCHprotected static StringMATCHEDprotected StringmatcherDescriptionprotected MockServerLoggermockServerLoggerprotected static StringREQUEST_DID_MATCHprotected static StringREQUEST_DID_NOT_MATCHprotected static StringREQUEST_MATCHER
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractHttpRequestMatcher(Configuration configuration, MockServerLogger mockServerLogger)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected static booleanapplyNotOperators(boolean baseMatches, boolean requestNot, boolean expectationNot, boolean matcherNot)booleanequals(Object o)ExpectationgetExpectation()MockServerMatcherNotifier.CausegetSource()inthashCode()booleanisActive()booleanisBlank()booleanisResponseInProgress()abstract booleanmatches(MatchDifference context, RequestDefinition requestDefinition)booleanmatches(RequestDefinition requestDefinition)voidsetControlPlaneMatcher(boolean controlPlaneMatcher)voidsetDescription(String description)HttpRequestMatchersetResponseInProgress(boolean responseInProgress)booleanupdate(Expectation expectation)booleanupdate(RequestDefinition requestDefinition)AbstractHttpRequestMatcherwithSource(MockServerMatcherNotifier.Cause source)-
Methods inherited from class org.mockserver.matchers.NotMatcher
notMatcher
-
Methods inherited from class org.mockserver.model.ObjectWithReflectiveEqualsHashCodeToString
fieldsExcludedFromEqualsAndHashCode, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.mockserver.matchers.HttpRequestMatcher
getHttpRequests
-
-
-
-
Field Detail
-
REQUEST_DID_NOT_MATCH
protected static final String REQUEST_DID_NOT_MATCH
- See Also:
- Constant Field Values
-
REQUEST_MATCHER
protected static final String REQUEST_MATCHER
- See Also:
- Constant Field Values
-
EXPECTATION
protected static final String EXPECTATION
- See Also:
- Constant Field Values
-
BECAUSE
protected static final String BECAUSE
- See Also:
- Constant Field Values
-
REQUEST_DID_MATCH
protected static final String REQUEST_DID_MATCH
- See Also:
- Constant Field Values
-
EXPECTATION_DID_MATCH
protected static final String EXPECTATION_DID_MATCH
- See Also:
- Constant Field Values
-
DID_NOT_MATCH
protected static final String DID_NOT_MATCH
- See Also:
- Constant Field Values
-
MATCHED
protected static final String MATCHED
- See Also:
- Constant Field Values
-
COLON_NEW_LINES
protected static final String COLON_NEW_LINES
-
configuration
protected final Configuration configuration
-
mockServerLogger
protected final MockServerLogger mockServerLogger
-
controlPlaneMatcher
protected boolean controlPlaneMatcher
-
expectation
protected Expectation expectation
-
matcherDescription
protected String matcherDescription
-
didNotMatchRequestBecause
protected String didNotMatchRequestBecause
-
didNotMatchExpectationBecause
protected String didNotMatchExpectationBecause
-
didNotMatchExpectationWithoutBecause
protected String didNotMatchExpectationWithoutBecause
-
-
Constructor Detail
-
AbstractHttpRequestMatcher
protected AbstractHttpRequestMatcher(Configuration configuration, MockServerLogger mockServerLogger)
-
-
Method Detail
-
setDescription
public void setDescription(String description)
-
update
public boolean update(Expectation expectation)
- Specified by:
updatein interfaceHttpRequestMatcher
-
update
public boolean update(RequestDefinition requestDefinition)
- Specified by:
updatein interfaceHttpRequestMatcher
-
setControlPlaneMatcher
public void setControlPlaneMatcher(boolean controlPlaneMatcher)
-
matches
public boolean matches(RequestDefinition requestDefinition)
- Specified by:
matchesin interfaceHttpRequestMatcher
-
matches
public abstract boolean matches(MatchDifference context, RequestDefinition requestDefinition)
- Specified by:
matchesin interfaceHttpRequestMatcher- Specified by:
matchesin interfaceMatcher<RequestDefinition>
-
getExpectation
public Expectation getExpectation()
- Specified by:
getExpectationin interfaceHttpRequestMatcher
-
isResponseInProgress
public boolean isResponseInProgress()
- Specified by:
isResponseInProgressin interfaceHttpRequestMatcher
-
setResponseInProgress
public HttpRequestMatcher setResponseInProgress(boolean responseInProgress)
- Specified by:
setResponseInProgressin interfaceHttpRequestMatcher
-
getSource
public MockServerMatcherNotifier.Cause getSource()
- Specified by:
getSourcein interfaceHttpRequestMatcher
-
withSource
public AbstractHttpRequestMatcher withSource(MockServerMatcherNotifier.Cause source)
- Specified by:
withSourcein interfaceHttpRequestMatcher
-
isBlank
public boolean isBlank()
- Specified by:
isBlankin interfaceMatcher<RequestDefinition>
-
isActive
public boolean isActive()
- Specified by:
isActivein interfaceHttpRequestMatcher
-
equals
public boolean equals(Object o)
- Overrides:
equalsin classObjectWithReflectiveEqualsHashCodeToString
-
hashCode
public int hashCode()
- Overrides:
hashCodein classObjectWithReflectiveEqualsHashCodeToString
-
applyNotOperators
protected static boolean applyNotOperators(boolean baseMatches, boolean requestNot, boolean expectationNot, boolean matcherNot)
-
-