Class DefaultSecretsService.Builder

    • Method Detail

      • withSecretsProvider

        public DefaultSecretsService.Builder withSecretsProvider​(SecretsProvider provider)
        Configure this service with the given provider.

        Note that this automatically replace any previously set reference to SecretsService.

        Parameters:
        provider - secrets provider
        Returns:
        this builder.
      • withDefaultStore

        public DefaultSecretsService.Builder withDefaultStore​(Supplier<SecretStore<?>> supplier)
        Configure this service with a default SecretStore supplier.

        This supplier will only be called if there is no store configured in the JSON node.

        Parameters:
        supplier - provide a default SecretStore
        Returns:
        this builder
      • injectIn

        public void injectIn​(HeapImpl destination)
                      throws HeapException
        Builds and configures a new DefaultSecretsService instance, and finally inject the reference in the given destination HeapImpl.
        Parameters:
        destination - heap receiving the new SecretsService
        Throws:
        HeapException - if cannot build the instance