Class ModelHandlerPostProcessor

java.lang.Object
io.fluxzero.sdk.configuration.spring.ModelHandlerPostProcessor

public class ModelHandlerPostProcessor extends Object
Discovers independent models and self-applying model command types within Spring component-scan boundaries.

Discovered types are registered as Fluxzero prototypes, just like self-tracking payloads. Their automatic command handlers therefore use the asynchronous tracker infrastructure and never turn publishing from the same application into local command handling. A discovered command only becomes a handler when its locally registered model chain contains a reachable model @Apply. An interceptor with a dynamically typed result is also tracked because its concrete output can only be known during command handling.

  • Constructor Details

    • ModelHandlerPostProcessor

      public ModelHandlerPostProcessor()
  • Method Details

    • getTargetAnnotation

      protected Class<Model> getTargetAnnotation()
    • getBeanNameSuffix

      protected String getBeanNameSuffix()
    • getTargetTypeFilter

      protected org.springframework.core.type.filter.TypeFilter getTargetTypeFilter()
    • isTargetType

      protected boolean isTargetType(Class<?> type)
      Returns whether an already registered Spring bean should be represented as a Fluxzero prototype instead.
    • postProcessBeanFactory

      public void postProcessBeanFactory(@NonNull @NonNull org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory) throws org.springframework.beans.BeansException
      Throws:
      org.springframework.beans.BeansException
    • postProcessBeanDefinitionRegistry

      public void postProcessBeanDefinitionRegistry(@NonNull @NonNull org.springframework.beans.factory.support.BeanDefinitionRegistry registry) throws org.springframework.beans.BeansException
      Throws:
      org.springframework.beans.BeansException
    • setEnvironment

      public void setEnvironment(org.springframework.core.env.Environment environment)
    • expandCandidateTypes

      protected Stream<Class<?>> expandCandidateTypes(List<Class<?>> candidates, List<String> basePackages, org.springframework.context.annotation.ComponentScan componentScan, org.springframework.beans.factory.support.BeanDefinitionRegistry registry, org.springframework.core.io.ResourceLoader resourceLoader)
    • findImplementations

      protected Stream<Class<?>> findImplementations(List<Class<?>> targetTypes, List<String> basePackages, org.springframework.context.annotation.ComponentScan componentScan, org.springframework.beans.factory.support.BeanDefinitionRegistry registry, org.springframework.core.io.ResourceLoader resourceLoader)