Class BindableFunctionProxyFactory
java.lang.Object
org.springframework.cloud.stream.binding.AbstractBindableProxyFactory
org.springframework.cloud.stream.binding.BindableProxyFactory
org.springframework.cloud.stream.function.BindableFunctionProxyFactory
- All Implemented Interfaces:
org.aopalliance.aop.Advice
,org.aopalliance.intercept.Interceptor
,org.aopalliance.intercept.MethodInterceptor
,org.springframework.beans.factory.Aware
,org.springframework.beans.factory.BeanFactoryAware
,org.springframework.beans.factory.FactoryBean<Object>
,org.springframework.beans.factory.InitializingBean
,Bindable
,org.springframework.context.ApplicationContextAware
public class BindableFunctionProxyFactory
extends BindableProxyFactory
implements org.springframework.context.ApplicationContextAware
FactoryBean
for creating inputs/outputs destinations to be bound to
function arguments. It is an extension to BindableProxyFactory
which
operates on Bindable interfaces (e.g., Source, Processor, Sink) which internally
define inputs and output channels. Unlike BindableProxyFactory, this class
operates based on the count of provided inputs and outputs deriving the binding
(channel) names based on convention - `<function-definition>. + <in/out> + .<index>`
For example, `myFunction.in.0` - is the binding for the first input argument of the function with the name `myFunction`.
- Since:
- 3.0
- Author:
- Oleg Zhurakousky, Soby Chacko
-
Field Summary
Fields inherited from class org.springframework.cloud.stream.binding.BindableProxyFactory
beanFactory
Fields inherited from class org.springframework.cloud.stream.binding.AbstractBindableProxyFactory
bindingTargetFactories, inputHolders, outputHolders, type
Fields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE
-
Method Summary
Modifier and TypeMethodDescriptionvoid
protected String
protected String
getInputName
(int index) Class<?>
protected String
getOutputName
(int index) protected boolean
boolean
void
setApplicationContext
(org.springframework.context.ApplicationContext applicationContext) Methods inherited from class org.springframework.cloud.stream.binding.BindableProxyFactory
getObject, invoke, replaceInputChannel, replaceOutputChannel, setBeanFactory
Methods inherited from class org.springframework.cloud.stream.binding.AbstractBindableProxyFactory
createAndBindInputs, createAndBindOutputs, getBindingTargetFactory, getInputs, getOutputs, populateBindingTargetFactories, unbindInputs, unbindOutputs
-
Method Details
-
afterPropertiesSet
public void afterPropertiesSet()- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
- Overrides:
afterPropertiesSet
in classBindableProxyFactory
-
getObjectType
- Specified by:
getObjectType
in interfaceorg.springframework.beans.factory.FactoryBean<Object>
- Overrides:
getObjectType
in classBindableProxyFactory
-
isSingleton
public boolean isSingleton()- Specified by:
isSingleton
in interfaceorg.springframework.beans.factory.FactoryBean<Object>
- Overrides:
isSingleton
in classBindableProxyFactory
-
getFunctionDefinition
-
getInputName
-
getOutputName
-
isMultiple
protected boolean isMultiple() -
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException - Specified by:
setApplicationContext
in interfaceorg.springframework.context.ApplicationContextAware
- Throws:
org.springframework.beans.BeansException
-