Interface ExpectationCallback
- All Known Implementing Classes:
AbstractRouteProxyCallback,AbstractTigerRouteCallback,ForwardAllCallback,ForwardProxyCallback,ReverseProxyCallback
public interface ExpectationCallback
-
Method Summary
Modifier and TypeMethodDescriptioncannedResponse(HttpRequest httpRequest) default HttpRequesthandle(HttpRequest httpRequest) Called for every request when expectation condition has been satisfied.handle(HttpRequest httpRequest, HttpResponse httpResponse, HttpRequest originalRequest) Called for every response received from a proxied request, the return value is the returned by MockServer.handleException(Throwable exception, HttpRequest request) default booleanmatches(HttpRequest httpRequest)
-
Method Details
-
handle
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.- Parameters:
httpRequest- the request that satisfied the expectation condition- Returns:
- the request that will be proxied
-
handle
HttpResponse handle(HttpRequest httpRequest, HttpResponse httpResponse, HttpRequest originalRequest) 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 returnoriginalRequest- the original request- Returns:
- the request that will be proxied
-
matches
-
cannedResponse
-
handleException
-