Class CoherenceConfigDataLocationResolver

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected java.lang.String getPrefix()
      Will return COHERENCE_PREFIX.
      boolean isResolvable​(org.springframework.boot.context.config.ConfigDataLocationResolverContext context, org.springframework.boot.context.config.ConfigDataLocation location)
      Will return true only if the provided ConfigDataLocation has the prefix as defined by getPrefix() and if the configuration for the Coherence backend is enabled.
      protected CoherenceConfigClientProperties loadProperties​(org.springframework.boot.context.config.ConfigDataLocationResolverContext context)
      java.util.List<CoherenceConfigDataResource> resolve​(org.springframework.boot.context.config.ConfigDataLocationResolverContext context, org.springframework.boot.context.config.ConfigDataLocation location)
      Not used.
      java.util.List<CoherenceConfigDataResource> 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CoherenceConfigDataLocationResolver

        public CoherenceConfigDataLocationResolver()
    • Method Detail

      • isResolvable

        public boolean isResolvable​(org.springframework.boot.context.config.ConfigDataLocationResolverContext context,
                                    org.springframework.boot.context.config.ConfigDataLocation location)
        Will return true only if the provided ConfigDataLocation has the prefix as defined by getPrefix() and if the configuration for the Coherence backend is enabled.
        Specified by:
        isResolvable in 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:
        CoherenceConfigClientProperties
      • getPrefix

        protected java.lang.String getPrefix()
        Will return COHERENCE_PREFIX.
        Returns:
        the prefix constant COHERENCE_PREFIX
      • resolve

        public java.util.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:
        resolve in interface org.springframework.boot.context.config.ConfigDataLocationResolver<CoherenceConfigDataResource>
        Parameters:
        context - not used
        location - not used
        Returns:
        an empty List
      • resolveProfileSpecific

        public java.util.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:
        resolveProfileSpecific in 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
      • loadProperties

        protected CoherenceConfigClientProperties loadProperties​(org.springframework.boot.context.config.ConfigDataLocationResolverContext context)
        Load the CoherenceConfigClientProperties. Also, if CoherenceConfigClientProperties.getApplicationName() is not set, then default to the value spring.application.name if available, of if that value is not available, either, default to the name application.
        Parameters:
        context - the ConfigDataLocationResolverContext
        Returns:
        returns either the CoherenceConfigClientProperties from the ConfigDataLocationResolverContext or a new instance of CoherenceConfigClientProperties