Class AbstractTigerRouteCallback
java.lang.Object
de.gematik.test.tiger.proxy.handler.AbstractTigerRouteCallback
- All Implemented Interfaces:
ExpectationCallback
- Direct Known Subclasses:
AbstractRouteProxyCallback,ForwardAllCallback
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, TigerProxyRoute tigerRoute) -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyModifications(HttpRequest request) voidapplyModifications(HttpRequest request, HttpResponse response) protected booleanvoidvoidbooleanexecuteHttpRequestParsing(HttpRequest mockServerRequest) protected abstract Stringfinal HttpRequesthandle(HttpRequest req) Called for every request when expectation condition has been satisfied.final HttpResponsehandle(HttpRequest req, HttpResponse resp, HttpRequest originalRequest) 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) voidvoidparseMessageAndApplyModifications(HttpRequest request, HttpResponse response) protected abstract StringvoidpropagateExceptionMessageSafe(Exception exception) protected StringrewriteConcreteLocation(String originalLocation) voidsetPreviousMessageUuid(AtomicReference<String> previousMessageUuid) 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
-
-
Method Details
-
applyModifications
-
parseMessageAndApplyModifications
-
applyModifications
-
parseMessageAndApplyModifications
-
handle
Description copied from interface:ExpectationCallbackCalled 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- Parameters:
req- the request that satisfied the expectation condition- Returns:
- the request that will be proxied
-
propagateExceptionMessageSafe
-
handleRequest
-
handle
Description copied from interface:ExpectationCallbackCalled for every response received from a proxied request, the return value is the returned by MockServer.- Specified by:
handlein interfaceExpectationCallback- Parameters:
req- the request that was proxiedresp- the response the MockServer will returnoriginalRequest- the original request- Returns:
- the request that will be proxied
-
rewriteConcreteLocation
-
parseMessage
-
executeHttpRequestParsing
-
extractProtocolAndHostForRequest
-
doOutgoingResponseLogging
-
doIncomingRequestLogging
-
printTrafficTarget
-
matches
- Specified by:
matchesin interfaceExpectationCallback
-
handleException
- Specified by:
handleExceptionin interfaceExpectationCallback
-
getTigerProxy
-
getTigerRoute
-
getPreviousMessageUuid
-
setPreviousMessageUuid
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-