Class AccountManagementEnvironmentPostProcessor

java.lang.Object
com.wavefront.spring.autoconfigure.AccountManagementEnvironmentPostProcessor
All Implemented Interfaces:
EventListener, org.springframework.boot.env.EnvironmentPostProcessor, org.springframework.context.ApplicationListener<org.springframework.boot.context.event.SpringApplicationEvent>

public class AccountManagementEnvironmentPostProcessor extends Object implements org.springframework.boot.env.EnvironmentPostProcessor, org.springframework.context.ApplicationListener<org.springframework.boot.context.event.SpringApplicationEvent>
An EnvironmentPostProcessor that auto-negotiates an api token for Wavefront if necessary. If an account was already provisioned and the api token is available from disk, retrieves a one time link url to the Wavefront dashboard.
Author:
Stephane Nicoll
  • Field Details

  • Constructor Details

    • AccountManagementEnvironmentPostProcessor

      public AccountManagementEnvironmentPostProcessor()
  • Method Details

    • postProcessEnvironment

      public void postProcessEnvironment(org.springframework.core.env.ConfigurableEnvironment environment, org.springframework.boot.SpringApplication application)
      Specified by:
      postProcessEnvironment in interface org.springframework.boot.env.EnvironmentPostProcessor
    • onApplicationEvent

      public void onApplicationEvent(@NonNull org.springframework.boot.context.event.SpringApplicationEvent event)
      Specified by:
      onApplicationEvent in interface org.springframework.context.ApplicationListener<org.springframework.boot.context.event.SpringApplicationEvent>
    • shouldEnableAccountManagement

      protected boolean shouldEnableAccountManagement(Thread thread)
    • getLocalApiTokenResource

      protected org.springframework.core.io.Resource getLocalApiTokenResource()
    • getExistingAccount

      protected AccountInfo getExistingAccount(AccountManagementClient client, String clusterUri, com.wavefront.sdk.common.application.ApplicationTags applicationTags, String apiToken)
    • provisionAccount

      protected AccountInfo provisionAccount(AccountManagementClient client, String clusterUri, com.wavefront.sdk.common.application.ApplicationTags applicationTags)