Class KafkaStreamsBindableProxyFactory

java.lang.Object
org.springframework.cloud.stream.binding.AbstractBindableProxyFactory
org.springframework.cloud.stream.binder.kafka.streams.function.KafkaStreamsBindableProxyFactory
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.InitializingBean, org.springframework.cloud.stream.binding.Bindable

public class KafkaStreamsBindableProxyFactory extends org.springframework.cloud.stream.binding.AbstractBindableProxyFactory implements org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.BeanFactoryAware
Kafka Streams specific target bindings proxy factory. See AbstractBindableProxyFactory for more details.

Targets bound by this factory:

KStream KTable GlobalKTable

This class looks at the Function bean's return signature as ResolvableType and introspect the individual types, binding them on the way.

All types on the ResolvableType are bound except for KStream[] array types on the outbound, which will be deferred for binding at a later stage. The reason for doing that is because in this class, we don't have any way to know the actual size in the returned array. That has to wait until the function is invoked and we get a result.

Since:
3.0.0
Author:
Soby Chacko
  • Constructor Details

    • KafkaStreamsBindableProxyFactory

      public KafkaStreamsBindableProxyFactory(org.springframework.core.ResolvableType[] types, String functionName, Method method)
  • Method Details

    • afterPropertiesSet

      public void afterPropertiesSet()
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
    • getInputs

      public Set<String> getInputs()
      Specified by:
      getInputs in interface org.springframework.cloud.stream.binding.Bindable
      Overrides:
      getInputs in class org.springframework.cloud.stream.binding.AbstractBindableProxyFactory
    • getOutputs

      public Set<String> getOutputs()
      Specified by:
      getOutputs in interface org.springframework.cloud.stream.binding.Bindable
      Overrides:
      getOutputs in class org.springframework.cloud.stream.binding.AbstractBindableProxyFactory
    • setBeanFactory

      public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) throws org.springframework.beans.BeansException
      Specified by:
      setBeanFactory in interface org.springframework.beans.factory.BeanFactoryAware
      Throws:
      org.springframework.beans.BeansException
    • addOutputBinding

      public void addOutputBinding(String output, Class<?> clazz)
    • getFunctionName

      public String getFunctionName()
    • getOutputHolders

      public Map<String,org.springframework.cloud.stream.binding.BoundTargetHolder> getOutputHolders()