Package de.gematik.test.tiger.proxy
Class TigerProxy
java.lang.Object
de.gematik.test.tiger.proxy.AbstractTigerProxy
de.gematik.test.tiger.proxy.TigerProxy
- All Implemented Interfaces:
ITigerProxy,AutoCloseable
-
Field Summary
Fields inherited from class de.gematik.test.tiger.proxy.AbstractTigerProxy
log, PAIRED_MESSAGE_UUID, pairingPostProcessor -
Constructor Summary
ConstructorsConstructorDescriptionTigerProxy(de.gematik.test.tiger.common.data.config.tigerProxy.TigerProxyConfiguration configuration) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAlternativeName(String host) Adds the given host to the list of alternative names in the tiger proxy TLS certificate.de.gematik.test.tiger.common.config.RbelModificationDescriptionaddModificaton(de.gematik.test.tiger.common.config.RbelModificationDescription modification) voidaddNewExceptionConsumer(Consumer<Throwable> newConsumer) de.gematik.test.tiger.common.data.config.tigerProxy.TigerRouteaddRoute(de.gematik.test.tiger.common.data.config.tigerProxy.TigerRoute tigerRoute) protected booleanvoidclose()booleanintTiger Proxy health endpoint performs http get requests towards the local server port of the Tiger Proxy.List<de.gematik.test.tiger.common.config.RbelModificationDescription>intList<de.gematik.test.tiger.common.data.config.tigerProxy.TigerRoute>inthashCode()voidpropagateException(Throwable exception) voidremoveModification(String modificationId) voidremoveRoute(String routeId) voidWill restart the internal mockserver.voidsubscribeToTrafficEndpoints(de.gematik.test.tiger.common.data.config.tigerProxy.TigerProxyConfiguration configuration) voidsubscribeToTrafficEndpoints(List<String> trafficEndpointUrls) Methods inherited from class de.gematik.test.tiger.proxy.AbstractTigerProxy
addKey, addRbelMessageListener, clearAllMessages, clearAllRoutes, getFileParsedCompletely, getFileParsingException, getLog, getName, getRbelFileWriter, getRbelLogger, getRbelMessageListeners, getRbelMessages, getRbelMessagesList, getTigerProxyConfiguration, getTrafficParserExecutor, isFileParsed, isShuttingDown, proxyName, readTrafficFromString, readTrafficFromTgrFile, removeRbelMessageListener, setFileParsedCompletely, setFileParsingException, setName, setRbelFileWriter, setRbelLogger, setShuttingDown, toString, triggerListener, waitForRemoteTigerProxyToBeOnline
-
Constructor Details
-
TigerProxy
public TigerProxy(de.gematik.test.tiger.common.data.config.tigerProxy.TigerProxyConfiguration configuration)
-
-
Method Details
-
restartMockserver
public void restartMockserver()Will restart the internal mockserver. This can be done to force a reload of the configured TLS-identities. This will block until the mockserver is running again. Background connections will most likely be interrupted. Routes will be re-added to the server, but the ID's will change. -
subscribeToTrafficEndpoints
public void subscribeToTrafficEndpoints(de.gematik.test.tiger.common.data.config.tigerProxy.TigerProxyConfiguration configuration) -
subscribeToTrafficEndpoints
-
getBaseUrl
- Specified by:
getBaseUrlin interfaceITigerProxy
-
getProxyPort
public int getProxyPort()- Specified by:
getProxyPortin interfaceITigerProxy
-
getAdminPort
public int getAdminPort() -
getRoutes
- Specified by:
getRoutesin interfaceITigerProxy
-
addModificaton
public de.gematik.test.tiger.common.config.RbelModificationDescription addModificaton(de.gematik.test.tiger.common.config.RbelModificationDescription modification) - Specified by:
addModificatonin interfaceITigerProxy
-
getModifications
- Specified by:
getModificationsin interfaceITigerProxy
-
removeModification
- Specified by:
removeModificationin interfaceITigerProxy
-
addRoute
public de.gematik.test.tiger.common.data.config.tigerProxy.TigerRoute addRoute(de.gematik.test.tiger.common.data.config.tigerProxy.TigerRoute tigerRoute) - Specified by:
addRoutein interfaceITigerProxy
-
addAlternativeName
Adds the given host to the list of alternative names in the tiger proxy TLS certificate. Adding alternative names after an initial request has been handled by the tiger proxy will have no effect, since the internal mockserver will have already created its SSLContext. If this is required, then a restart of the internal mockserver is necessary. SeerestartMockserver()- Parameters:
host- the host to add as alternative name.
-
removeRoute
- Specified by:
removeRoutein interfaceITigerProxy
-
getConfiguredTigerProxySslContext
-
buildTrustManagerForTigerProxy
-
buildTruststore
-
buildSslContext
-
propagateException
-
addNewExceptionConsumer
-
close
@PreDestroy public void close()- Specified by:
closein interfaceAutoCloseable- Overrides:
closein classAbstractTigerProxy
-
equals
- Overrides:
equalsin classAbstractTigerProxy
-
canEqual
- Overrides:
canEqualin classAbstractTigerProxy
-
hashCode
public int hashCode()- Overrides:
hashCodein classAbstractTigerProxy
-
getMockServerToRbelConverter
-
getHealthEndpointRequestUuid
Tiger Proxy health endpoint performs http get requests towards the local server port of the Tiger Proxy. To filter them out from Rbel logs we add a specific query param (healthEndPointUuid) with this uuid as value. The Filtering takes place inAbstractTigerRouteCallback.
-