Class ReloadableSpringService<T>

    • Field Detail

      • log

        @Nonnull
        private final org.slf4j.Logger log
        Class logger.
      • serviceConfigurations

        @Nonnull
        @NonnullElements
        private List<Resource> serviceConfigurations
        List of configuration resources for this service.
      • conversionService

        @Nullable
        private ConversionService conversionService
        Conversion service to use.
      • theClaz

        @Nonnull
        private final Class<T> theClaz
        The class we are looking for.
      • parentContext

        @Nullable
        private ApplicationContext parentContext
        Application context owning this engine.
      • beanName

        @Nullable
        private String beanName
        The bean name.
      • cachedComponent

        @Nullable
        private ServiceableComponent<T> cachedComponent
        The last known good component.
      • lastLoadFailed

        private boolean lastLoadFailed
        Did the last load fail? An optimization only.
      • resourceLastModifiedTimes

        @Nullable
        private Instant[] resourceLastModifiedTimes
        Time when the service configuration for the given index was last observed to have changed. A null indicates the configuration resource did not exist.
    • Method Detail

      • getParentContext

        @Nullable
        public ApplicationContext getParentContext()
        Gets the application context that is the parent to this service's context.
        Returns:
        application context that is the parent to this service's context
      • setParentContext

        public void setParentContext​(@Nullable
                                     ApplicationContext context)
        Sets the application context that is the parent to this service's context. This setting can not be changed after the service has been initialized.
        Parameters:
        context - context that is the parent to this service's context, may be null
      • getServiceConfigurations

        @Nonnull
        public List<Resource> getServiceConfigurations()
        Gets an unmodifiable list of configurations for this service.
        Returns:
        unmodifiable list of configurations for this service
      • setServiceConfigurations

        public void setServiceConfigurations​(@Nonnull @NonnullElements
                                             List<Resource> configs)
        Set the list of configurations for this service. This setting can not be changed after the service has been initialized.
        Parameters:
        configs - list of configurations for this service
      • setServiceConfigurationStrategy

        public void setServiceConfigurationStrategy​(@Nonnull
                                                    Function<?,​List<Resource>> strategy)
        Set the strategy by which the Service can locate the resources it needs to know about.

        Not implemented.

        Parameters:
        strategy - the way to get the resources. Precise details are tbd.
      • setBeanFactoryPostProcessors

        public void setBeanFactoryPostProcessors​(@Nonnull @NonnullElements
                                                 List<BeanFactoryPostProcessor> processors)
        Set the list of bean factory post processors for this service.
        Parameters:
        processors - bean factory post processors to apply
      • setBeanPostProcessors

        public void setBeanPostProcessors​(@Nonnull @NonnullElements
                                          List<BeanPostProcessor> processors)
        Set the list of bean post processors for this service.
        Parameters:
        processors - bean post processors to apply
      • setBeanProfiles

        public void setBeanProfiles​(@Nonnull @NonnullElements
                                    Collection<String> profiles)
        Set the bean profiles for this service.
        Parameters:
        profiles - bean profiles to apply
        Since:
        5.4.0
      • setConversionService

        public void setConversionService​(@Nullable
                                         ConversionService service)
        Set a conversion service to use.
        Parameters:
        service - conversion service
        Since:
        5.4.0
      • start

        public final void start()
        Specified by:
        start in interface Lifecycle
      • stop

        public final void stop()
        Specified by:
        stop in interface Lifecycle
      • isRunning

        public boolean isRunning()
        .
        Specified by:
        isRunning in interface Lifecycle