Class TigerProxy

All Implemented Interfaces:
ITigerProxy, AutoCloseable

@Component public class TigerProxy extends AbstractTigerProxy implements AutoCloseable
  • 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

      public void subscribeToTrafficEndpoints(List<String> trafficEndpointUrls)
    • getBaseUrl

      public String getBaseUrl()
      Specified by:
      getBaseUrl in interface ITigerProxy
    • getProxyPort

      public int getProxyPort()
      Specified by:
      getProxyPort in interface ITigerProxy
    • getAdminPort

      public int getAdminPort()
    • getRoutes

      public List<de.gematik.test.tiger.common.data.config.tigerProxy.TigerRoute> getRoutes()
      Specified by:
      getRoutes in interface ITigerProxy
    • addModificaton

      public de.gematik.test.tiger.common.config.RbelModificationDescription addModificaton(de.gematik.test.tiger.common.config.RbelModificationDescription modification)
      Specified by:
      addModificaton in interface ITigerProxy
    • getModifications

      public List<de.gematik.test.tiger.common.config.RbelModificationDescription> getModifications()
      Specified by:
      getModifications in interface ITigerProxy
    • removeModification

      public void removeModification(String modificationId)
      Specified by:
      removeModification in interface ITigerProxy
    • addRoute

      public de.gematik.test.tiger.common.data.config.tigerProxy.TigerRoute addRoute(de.gematik.test.tiger.common.data.config.tigerProxy.TigerRoute tigerRoute)
      Specified by:
      addRoute in interface ITigerProxy
    • addAlternativeName

      public void addAlternativeName(String host)
      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. See restartMockserver()
      Parameters:
      host - the host to add as alternative name.
    • removeRoute

      public void removeRoute(String routeId)
      Specified by:
      removeRoute in interface ITigerProxy
    • getConfiguredTigerProxySslContext

      public SSLContext getConfiguredTigerProxySslContext()
    • buildTrustManagerForTigerProxy

      public X509TrustManager buildTrustManagerForTigerProxy()
    • buildTruststore

      public KeyStore buildTruststore()
    • buildSslContext

      public SSLContext buildSslContext()
    • propagateException

      public void propagateException(Throwable exception)
    • addNewExceptionConsumer

      public void addNewExceptionConsumer(Consumer<Throwable> newConsumer)
    • close

      @PreDestroy public void close()
      Specified by:
      close in interface AutoCloseable
      Overrides:
      close in class AbstractTigerProxy
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class AbstractTigerProxy
    • canEqual

      protected boolean canEqual(Object other)
      Overrides:
      canEqual in class AbstractTigerProxy
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class AbstractTigerProxy
    • getMockServerToRbelConverter

      public MockServerToRbelConverter getMockServerToRbelConverter()
    • getHealthEndpointRequestUuid

      public UUID 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 in AbstractTigerRouteCallback.