Interface ExpectationForwardAndResponseCallback

All Superinterfaces:
ExpectationCallback<HttpRequest>, ExpectationForwardCallback
All Known Implementing Classes:
AbstractRouteProxyCallback, AbstractTigerRouteCallback, ForwardAllCallback, ForwardProxyCallback, ReverseProxyCallback

public interface ExpectationForwardAndResponseCallback extends ExpectationForwardCallback
  • Method Details

    • handle

      default HttpRequest handle(HttpRequest httpRequest)
      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 interface ExpectationCallback<HttpRequest>
      Specified by:
      handle in interface ExpectationForwardCallback
      Parameters:
      httpRequest - the request that satisfied the expectation condition
      Returns:
      the request that will be proxied
    • handle

      HttpResponse handle(HttpRequest httpRequest, HttpResponse httpResponse)
      Called for every response received from a proxied request, the return value is the returned by MockServer.
      Parameters:
      httpRequest - the request that was proxied
      httpResponse - the response the MockServer will return
      Returns:
      the request that will be proxied
    • handleException

      Action handleException(Throwable exception, HttpRequest request)