Package org.mockserver.mock.action
Interface ExpectationForwardAndResponseCallback
-
- All Superinterfaces:
ExpectationCallback<HttpRequest>,ExpectationForwardCallback
- All Known Implementing Classes:
PrecannedTestExpectationForwardCallbackRequestAndResponse
public interface ExpectationForwardAndResponseCallback extends ExpectationForwardCallback
- Author:
- jamesdbloom
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default HttpRequesthandle(HttpRequest httpRequest)Called for every request when expectation condition has been satisfied.HttpResponsehandle(HttpRequest httpRequest, HttpResponse httpResponse)Called for every response received from a proxied request, the return value is the returned by MockServer.
-
-
-
Method Detail
-
handle
default HttpRequest handle(HttpRequest httpRequest) throws Exception
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:
handlein interfaceExpectationCallback<HttpRequest>- Specified by:
handlein interfaceExpectationForwardCallback- Parameters:
httpRequest- the request that satisfied the expectation condition- Returns:
- the request that will be proxied
- Throws:
Exception
-
handle
HttpResponse handle(HttpRequest httpRequest, HttpResponse httpResponse) throws Exception
Called for every response received from a proxied request, the return value is the returned by MockServer.- Parameters:
httpRequest- the request that was proxiedhttpResponse- the response the MockServer will return- Returns:
- the request that will be proxied
- Throws:
Exception
-
-