public class TokenSetterImpl extends Object implements TokenSetter
TokenSetter| Constructor and Description | 
|---|
TokenSetterImpl(SdkConfigurationPropertiesReader sdkConfigurationPropertiesReader,
               SdkConfigurationYamlReader sdkConfigurationYamlReader,
               Function<UofConfiguration,WhoAmIReader> buildWhoAmIReader,
               Function<UofConfiguration,ProducerDataProvider> buildProducerDataProvider)  | 
| Modifier and Type | Method and Description | 
|---|---|
UofConfiguration | 
buildConfigFromApplicationYml()
Sets the general configuration properties to values read from configuration file. 
 | 
UofConfiguration | 
buildConfigFromSdkProperties()
Sets the general configuration properties to values read from configuration file. 
 | 
EnvironmentSelector | 
setAccessToken(String token)
Sets the access token used to access feed resources (AMQP broker, Sports API, ...) 
 | 
EnvironmentSelector | 
setAccessTokenFromApplicationYaml()
Sets the access token used to access feed resources (AMQP broker, Sports API, ...) to value read from the application.yml
 The YAML file should be named "application.properties" and localed in the application resources folder 
 | 
EnvironmentSelector | 
setAccessTokenFromSdkProperties()
Sets the access token used to access feed resources (AMQP broker, Sports API, ...) to value read from the sdk properties
 The properties file should be named "UFSdkConfiguration.properties" and localed in the application resources folder 
 | 
EnvironmentSelector | 
setAccessTokenFromSystemVar()
Sets the access token used to access feed resources (AMQP broker, Sports API, ...) to value read from system variable "uf.accesstoken" 
 | 
public TokenSetterImpl(SdkConfigurationPropertiesReader sdkConfigurationPropertiesReader, SdkConfigurationYamlReader sdkConfigurationYamlReader, Function<UofConfiguration,WhoAmIReader> buildWhoAmIReader, Function<UofConfiguration,ProducerDataProvider> buildProducerDataProvider)
public EnvironmentSelector setAccessToken(String token)
setAccessToken in interface TokenSettertoken - the access token used to access feed resourcesEnvironmentSelector instance allowing the selection of target environmentpublic EnvironmentSelector setAccessTokenFromSdkProperties()
setAccessTokenFromSdkProperties in interface TokenSetterEnvironmentSelector instance allowing the selection of target environmentpublic EnvironmentSelector setAccessTokenFromApplicationYaml()
setAccessTokenFromApplicationYaml in interface TokenSetterEnvironmentSelector instance allowing the selection of target environmentpublic EnvironmentSelector setAccessTokenFromSystemVar()
You can set the access token with the following JVM argument -Duf.accesstoken=your-access-token
setAccessTokenFromSystemVar in interface TokenSetterEnvironmentSelector instance allowing the selection of target environmentpublic UofConfiguration buildConfigFromSdkProperties()
ConfigurationBuilderBase methods are set. Any values already set by methods on the current instance
 are overridden. Builds and returns a UofConfigurationImpl instance
 The properties file should be named "UFSdkConfiguration.properties" and localed in the application resources folder
buildConfigFromSdkProperties in interface TokenSetterUofConfigurationImpl instancepublic UofConfiguration buildConfigFromApplicationYml()
ConfigurationBuilderBase methods are set. Any values already set by methods on the current instance
 are overridden. Builds and returns a UofConfigurationImpl instance
 The YAML file should be named "application.yml" and localed in the application resources folder
buildConfigFromApplicationYml in interface TokenSetterUofConfigurationImpl instanceCopyright © 2016–2025. All rights reserved.