Class DefaultBinderFactory
- java.lang.Object
-
- org.springframework.cloud.stream.binder.DefaultBinderFactory
-
- All Implemented Interfaces:
org.springframework.beans.factory.Aware
,org.springframework.beans.factory.DisposableBean
,BinderFactory
,org.springframework.context.ApplicationContextAware
public class DefaultBinderFactory extends Object implements BinderFactory, org.springframework.beans.factory.DisposableBean, org.springframework.context.ApplicationContextAware
DefaultBinderFactory
implementation.- Author:
- Marius Bogoevici, Ilayaperumal Gopinathan, Gary Russell, Oleg Zhurakousky, Soby Chacko, Artem Bilan, Anshul Mehra
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
DefaultBinderFactory.Listener
A listener that can be registered with theDefaultBinderFactory
that allows the registration of additional configuration.
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.commons.logging.Log
logger
-
Constructor Summary
Constructors Constructor Description DefaultBinderFactory(Map<String,BinderConfiguration> binderConfigurations, BinderTypeRegistry binderTypeRegistry, BinderCustomizer binderCustomizer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
destroy()
<T> Binder<T,?,?>
getBinder(String name, Class<? extends T> bindingTargetType)
Returns the binder instance associated with the given configuration name.void
setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
void
setDefaultBinder(String defaultBinder)
void
setListeners(Collection<DefaultBinderFactory.Listener> listeners)
-
-
-
Constructor Detail
-
DefaultBinderFactory
public DefaultBinderFactory(Map<String,BinderConfiguration> binderConfigurations, BinderTypeRegistry binderTypeRegistry, BinderCustomizer binderCustomizer)
-
-
Method Detail
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
- Specified by:
setApplicationContext
in interfaceorg.springframework.context.ApplicationContextAware
-
setDefaultBinder
public void setDefaultBinder(String defaultBinder)
-
setListeners
public void setListeners(Collection<DefaultBinderFactory.Listener> listeners)
-
destroy
public void destroy()
- Specified by:
destroy
in interfaceorg.springframework.beans.factory.DisposableBean
-
getBinder
public <T> Binder<T,?,?> getBinder(String name, Class<? extends T> bindingTargetType)
Description copied from interface:BinderFactory
Returns the binder instance associated with the given configuration name. Instance caching is a requirement, and implementations must return the same instance on subsequent invocations with the same arguments.- Specified by:
getBinder
in interfaceBinderFactory
- Type Parameters:
T
- the primary binding type- Parameters:
name
- the name of a binder configurationbindingTargetType
- binding target type- Returns:
- the binder instance
-
-