Package energy.eddie.aiida.config
Class AiidaConfiguration
java.lang.Object
energy.eddie.aiida.config.AiidaConfiguration
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclock()Returns a clock instance that should be used for timestamps (e.g.protected static org.springframework.web.reactive.function.client.ExchangeFilterFunctionlocalhostReplacementFilter(String replacementHost) org.springframework.boot.jackson.autoconfigure.JsonMapperBuilderCustomizerConfigures and returns an ObjectMapper bean that should be used for (de-)serializing POJOs to JSON.org.springframework.web.reactive.function.client.WebClientWebClientused for handshake with EDDIE.org.springframework.web.reactive.function.client.WebClientwebClientWithLocalhostReplacement(String replacementHost) AlternativeWebClientto use for the handshake with EDDIE if a localhost replacement is set.
-
Field Details
-
AIIDA_ZONE_ID
-
-
Constructor Details
-
AiidaConfiguration
public AiidaConfiguration()
-
-
Method Details
-
objectMapperCustomizer
@Bean @Primary public org.springframework.boot.jackson.autoconfigure.JsonMapperBuilderCustomizer objectMapperCustomizer()Configures and returns an ObjectMapper bean that should be used for (de-)serializing POJOs to JSON. The ObjectMapperSingleton can also be used by classes that cannot use constructor injection using the @Autowired annotation and will return the same instance.- Returns:
- ObjectMapper instance configured to fit the AIIDA project.
-
clock
Returns a clock instance that should be used for timestamps (e.g. when a permission is revoked). -
webClientWithLocalhostReplacement
@Bean(name="webClient") @ConditionalOnProperty(prefix="aiida.handshake", name="localhost-replacement") public org.springframework.web.reactive.function.client.WebClient webClientWithLocalhostReplacement(@Value("${aiida.handshake.localhost-replacement}") String replacementHost) AlternativeWebClientto use for the handshake with EDDIE if a localhost replacement is set. For handshake URLs with "localhost" as hostname, the hostname will be replaced with the replacement string. This is useful if handshake URLs pointing to "localhost" are to be interpreted as an EDDIE instance on the same host.- Parameters:
replacementHost- Host to replace "localhost" with.
-
webClient
@Bean @ConditionalOnMissingBean(name="webClient") public org.springframework.web.reactive.function.client.WebClient webClient()WebClientused for handshake with EDDIE. -
permissionFutures
-
localhostReplacementFilter
protected static org.springframework.web.reactive.function.client.ExchangeFilterFunction localhostReplacementFilter(String replacementHost)
-