Class PrecannedTestExpectationForwardCallbackRequestAndResponse
- java.lang.Object
-
- org.mockserver.integration.callback.PrecannedTestExpectationForwardCallbackRequestAndResponse
-
- All Implemented Interfaces:
ExpectationCallback<HttpRequest>
,ExpectationForwardAndResponseCallback
,ExpectationForwardCallback
public class PrecannedTestExpectationForwardCallbackRequestAndResponse extends Object implements ExpectationForwardAndResponseCallback
- Author:
- jamesdbloom
-
-
Constructor Summary
Constructors Constructor Description PrecannedTestExpectationForwardCallbackRequestAndResponse()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HttpRequest
handle(HttpRequest httpRequest)
Called for every request when expectation condition has been satisfied.HttpResponse
handle(HttpRequest httpRequest, HttpResponse httpResponse)
Called for every response received from a proxied request, the return value is the returned by MockServer.
-
-
-
Method Detail
-
handle
public HttpRequest handle(HttpRequest httpRequest)
Description copied from interface:ExpectationForwardAndResponseCallback
Called for every request when expectation condition has been satisfied. The request that satisfied the expectation condition is passed as the parameter and the return value is the request that will be proxied.- Specified by:
handle
in interfaceExpectationCallback<HttpRequest>
- Specified by:
handle
in interfaceExpectationForwardAndResponseCallback
- Specified by:
handle
in interfaceExpectationForwardCallback
- Parameters:
httpRequest
- the request that satisfied the expectation condition- Returns:
- the request that will be proxied
-
handle
public HttpResponse handle(HttpRequest httpRequest, HttpResponse httpResponse)
Description copied from interface:ExpectationForwardAndResponseCallback
Called for every response received from a proxied request, the return value is the returned by MockServer.- Specified by:
handle
in interfaceExpectationForwardAndResponseCallback
- Parameters:
httpRequest
- the request that was proxiedhttpResponse
- the response the MockServer will return- Returns:
- the request that will be proxied
-
-