Class CoherenceConfigDataLocationResolver
java.lang.Object
com.oracle.coherence.spring.boot.config.CoherenceConfigDataLocationResolver
- All Implemented Interfaces:
- org.springframework.boot.context.config.ConfigDataLocationResolver<CoherenceConfigDataResource>
public class CoherenceConfigDataLocationResolver
extends Object
implements org.springframework.boot.context.config.ConfigDataLocationResolver<CoherenceConfigDataResource>
ConfigDataLocationResolver for Coherence Spring resolving CoherenceConfigDataResource
 using the COHERENCE_PREFIX prefix.- Since:
- 3.0
- Author:
- Gunnar Hillert
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final StringPrefix used to indicate aCoherenceConfigDataResource.protected static final Log
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected StringWill returnCOHERENCE_PREFIX.booleanisResolvable(org.springframework.boot.context.config.ConfigDataLocationResolverContext context, org.springframework.boot.context.config.ConfigDataLocation location) Will return true only if the providedConfigDataLocationhas the prefix as defined bygetPrefix()and if the configuration for the Coherence backend is enabled.protected CoherenceConfigClientPropertiesloadProperties(org.springframework.boot.context.config.ConfigDataLocationResolverContext context) Load theCoherenceConfigClientProperties.resolve(org.springframework.boot.context.config.ConfigDataLocationResolverContext context, org.springframework.boot.context.config.ConfigDataLocation location) Not used.resolveProfileSpecific(org.springframework.boot.context.config.ConfigDataLocationResolverContext resolverContext, org.springframework.boot.context.config.ConfigDataLocation location, org.springframework.boot.context.config.Profiles profiles) Return a list of CoherenceConfigDataResources.
- 
Field Details- 
logger
- 
COHERENCE_PREFIXPrefix used to indicate aCoherenceConfigDataResource.- See Also:
 
 
- 
- 
Constructor Details- 
CoherenceConfigDataLocationResolverpublic CoherenceConfigDataLocationResolver()
 
- 
- 
Method Details- 
isResolvablepublic boolean isResolvable(org.springframework.boot.context.config.ConfigDataLocationResolverContext context, org.springframework.boot.context.config.ConfigDataLocation location) Will return true only if the providedConfigDataLocationhas the prefix as defined bygetPrefix()and if the configuration for the Coherence backend is enabled.- Specified by:
- isResolvablein interface- org.springframework.boot.context.config.ConfigDataLocationResolver<CoherenceConfigDataResource>
- Parameters:
- context- the ConfigDataLocationResolverContext
- location- the ConfigDataLocation
- Returns:
- true if this ConfigDataLocationResolver is applicable to the provided location
- See Also:
 
- 
getPrefixWill returnCOHERENCE_PREFIX.- Returns:
- the prefix constant COHERENCE_PREFIX
 
- 
resolvepublic List<CoherenceConfigDataResource> resolve(org.springframework.boot.context.config.ConfigDataLocationResolverContext context, org.springframework.boot.context.config.ConfigDataLocation location) Not used. Returns an empty list.- Specified by:
- resolvein interface- org.springframework.boot.context.config.ConfigDataLocationResolver<CoherenceConfigDataResource>
- Parameters:
- context- not used
- location- not used
- Returns:
- an empty List
 
- 
resolveProfileSpecificpublic List<CoherenceConfigDataResource> resolveProfileSpecific(org.springframework.boot.context.config.ConfigDataLocationResolverContext resolverContext, org.springframework.boot.context.config.ConfigDataLocation location, org.springframework.boot.context.config.Profiles profiles) throws org.springframework.boot.context.config.ConfigDataLocationNotFoundException Return a list of CoherenceConfigDataResources.- Specified by:
- resolveProfileSpecificin interface- org.springframework.boot.context.config.ConfigDataLocationResolver<CoherenceConfigDataResource>
- Parameters:
- resolverContext- the location resolver context
- location- the location that should be resolved
- profiles- profile information
- Returns:
- a list of resolved CoherenceConfigDataResources (contains 1 element only).
- Throws:
- org.springframework.boot.context.config.ConfigDataLocationNotFoundException- on a non-optional location that cannot be found
 
- 
loadPropertiesprotected CoherenceConfigClientProperties loadProperties(org.springframework.boot.context.config.ConfigDataLocationResolverContext context) Load theCoherenceConfigClientProperties. Also, ifCoherenceConfigClientProperties.getApplicationName()is not set, then default to the valuespring.application.nameif available, of if that value is not available, either, default to the nameapplication.- Parameters:
- context- the ConfigDataLocationResolverContext
- Returns:
- returns either the CoherenceConfigClientProperties from the ConfigDataLocationResolverContext or a new instance of CoherenceConfigClientProperties
 
 
-