@Configuration @EnableConfigurationProperties(value={HttpProperties.class,RetryProperties.class}) public class GenieApiAutoConfiguration extends java.lang.Object
Constructor and Description |
---|
GenieApiAutoConfiguration() |
Modifier and Type | Method and Description |
---|---|
AgentFileProtocolResolver |
agentFileProtocolResolver(AgentFileStreamService agentFileStreamService)
Protocol resolver agent file resources.
|
AgentFileProtocolResolverRegistrar |
agentFileProtocolResolverRegistrar(AgentFileProtocolResolver agentFileProtocolResolver)
Registrar for the
AgentFileProtocolResolver . |
org.springframework.web.filter.CharacterEncodingFilter |
characterEncodingFilter()
Character encoding filter that forces content-type in response to be UTF-8.
|
DirectoryWriter |
directoryWriter()
Get the directory writer to use.
|
GenieHostInfo |
genieHostInfo()
Get the
GenieHostInfo for this application. |
org.springframework.web.client.RestTemplate |
genieRestTemplate(HttpProperties httpProperties,
org.springframework.boot.web.client.RestTemplateBuilder restTemplateBuilder)
Get RestTemplate for calling between Genie nodes.
|
org.springframework.retry.support.RetryTemplate |
genieRetryTemplate(RetryProperties retryProperties)
Get RetryTemplate.
|
org.springframework.core.io.Resource |
jobsDir(org.springframework.core.io.ResourceLoader resourceLoader,
JobsProperties jobsProperties)
Get the jobs dir as a Spring Resource.
|
org.springframework.core.io.ResourceLoader |
resourceLoader()
Get a resource loader.
|
@Bean @ConditionalOnMissingBean(value=org.springframework.core.io.ResourceLoader.class) public org.springframework.core.io.ResourceLoader resourceLoader()
@Bean @ConditionalOnMissingBean(value=GenieHostInfo.class) public GenieHostInfo genieHostInfo() throws java.net.UnknownHostException
GenieHostInfo
for this application. This is the default fallback implementation if no other bean
instance of this type has been created.InetAddress
java.net.UnknownHostException
- When the host can't be calculatedjava.lang.IllegalStateException
- When an instance can't be createdInetAddress.getCanonicalHostName()
@Bean @ConditionalOnMissingBean(name="genieRestTemplate") public org.springframework.web.client.RestTemplate genieRestTemplate(HttpProperties httpProperties, org.springframework.boot.web.client.RestTemplateBuilder restTemplateBuilder)
httpProperties
- The properties related to Genie's HTTP client configurationrestTemplateBuilder
- The Spring REST template builder to use@Bean @ConditionalOnMissingBean(name="genieRetryTemplate") public org.springframework.retry.support.RetryTemplate genieRetryTemplate(RetryProperties retryProperties)
retryProperties
- The http retry properties to use@Bean @ConditionalOnMissingBean(value=DirectoryWriter.class) public DirectoryWriter directoryWriter()
@Bean @ConditionalOnMissingBean(name="jobsDir", value=org.springframework.core.io.Resource.class) public org.springframework.core.io.Resource jobsDir(org.springframework.core.io.ResourceLoader resourceLoader, JobsProperties jobsProperties) throws java.io.IOException
resourceLoader
- The resource loader to usejobsProperties
- The jobs properties to usejava.io.IOException
- on error reading or creating the directory@Bean public org.springframework.web.filter.CharacterEncodingFilter characterEncodingFilter()
@Bean @ConditionalOnMissingBean(value=AgentFileProtocolResolver.class) public AgentFileProtocolResolver agentFileProtocolResolver(AgentFileStreamService agentFileStreamService)
agentFileStreamService
- the agent file stream serviceAgentFileProtocolResolver
@Bean @ConditionalOnMissingBean(value=AgentFileProtocolResolverRegistrar.class) public AgentFileProtocolResolverRegistrar agentFileProtocolResolverRegistrar(AgentFileProtocolResolver agentFileProtocolResolver)
AgentFileProtocolResolver
.agentFileProtocolResolver
- a protocol AgentFileProtocolResolver
to registerAgentFileProtocolResolverRegistrar