Class AbstractTigerRouteCallback
java.lang.Object
de.gematik.test.tiger.proxy.handler.AbstractTigerRouteCallback
- All Implemented Interfaces:
ExpectationCallback<HttpRequest>,ExpectationForwardAndResponseCallback,ExpectationForwardCallback
- Direct Known Subclasses:
AbstractRouteProxyCallback,ForwardAllCallback
public abstract class AbstractTigerRouteCallback
extends Object
implements ExpectationForwardAndResponseCallback
Abstract super type handling the parsing logic for messages. It is the essential hook which
allows the TigerProxy to gather the messages going through the MockServer. The actual
implementations of this class deal with the routing of the messages.
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractTigerRouteCallback(TigerProxy tigerProxy, de.gematik.test.tiger.common.data.config.tigerproxy.TigerRoute tigerRoute) -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyModifications(HttpRequest request) voidapplyModifications(HttpResponse response) protected booleanvoidvoidbooleanexecuteHttpRequestParsing(HttpRequest mockServerRequest) protected abstract Stringde.gematik.test.tiger.common.data.config.tigerproxy.TigerRoutefinal HttpRequesthandle(HttpRequest req) Called for every request when expectation condition has been satisfied.final HttpResponsehandle(HttpRequest req, HttpResponse resp) Called for every response received from a proxied request, the return value is the returned by MockServer.handleException(Throwable exception, HttpRequest request) protected abstract HttpRequesthandleRequest(HttpRequest req) inthashCode()booleanmatches(HttpRequest request) voidparseMessage(HttpRequest mockServerRequest) voidvoidprotected abstract StringvoidpropagateExceptionMessageSafe(Exception exception) protected StringrewriteConcreteLocation(String originalLocation) voidsetBundledServerNamesAdder(BundledServerNamesAdder bundledServerNamesAdder) voidsetRequestLogIdToParsingFuture(Map<String, CompletableFuture<RbelElement>> requestLogIdToParsingFuture) toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface de.gematik.test.tiger.mockserver.mock.action.ExpectationCallback
cannedResponse
-
Field Details
-
LOCATION_HEADER_KEY
- See Also:
-
-
Constructor Details
-
AbstractTigerRouteCallback
protected AbstractTigerRouteCallback(TigerProxy tigerProxy, de.gematik.test.tiger.common.data.config.tigerproxy.TigerRoute tigerRoute)
-
-
Method Details
-
applyModifications
-
parseMessageAndApplyModifications
-
applyModifications
-
parseMessageAndApplyModifications
-
handle
Description copied from interface:ExpectationForwardAndResponseCallbackCalled 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 interfaceExpectationForwardAndResponseCallback- Specified by:
handlein interfaceExpectationForwardCallback- Parameters:
req- the request that satisfied the expectation condition- Returns:
- the request that will be proxied
-
propagateExceptionMessageSafe
-
handleRequest
-
handle
Description copied from interface:ExpectationForwardAndResponseCallbackCalled for every response received from a proxied request, the return value is the returned by MockServer.- Specified by:
handlein interfaceExpectationForwardAndResponseCallback- Parameters:
req- the request that was proxiedresp- the response the MockServer will return- Returns:
- the request that will be proxied
-
rewriteConcreteLocation
-
parseMessage
-
executeHttpRequestParsing
-
extractProtocolAndHostForRequest
-
doOutgoingResponseLogging
-
doIncomingRequestLogging
-
printTrafficTarget
-
matches
- Specified by:
matchesin interfaceExpectationCallback<HttpRequest>
-
handleException
- Specified by:
handleExceptionin interfaceExpectationForwardAndResponseCallback
-
getTigerProxy
-
getTigerRoute
public de.gematik.test.tiger.common.data.config.tigerproxy.TigerRoute getTigerRoute() -
getBundledServerNamesAdder
-
getRequestLogIdToParsingFuture
-
setBundledServerNamesAdder
-
setRequestLogIdToParsingFuture
public void setRequestLogIdToParsingFuture(Map<String, CompletableFuture<RbelElement>> requestLogIdToParsingFuture) -
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-