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, org.springframework.context.Lifecycle, org.springframework.context.Phased, org.springframework.context.SmartLifecycle
public class DefaultBinderFactory
extends Object
implements BinderFactory, org.springframework.beans.factory.DisposableBean, org.springframework.context.ApplicationContextAware, org.springframework.context.SmartLifecycle
Default
BinderFactory implementation.- Author:
- Marius Bogoevici, Ilayaperumal Gopinathan, Gary Russell, Oleg Zhurakousky, Soby Chacko, Artem Bilan, Anshul Mehra, Chris Bono, Byungjun You, Omer Celik
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceA listener that can be registered with theDefaultBinderFactorythat allows the registration of additional configuration. -
Field Summary
FieldsFields inherited from interface org.springframework.context.SmartLifecycle
DEFAULT_PHASE -
Constructor Summary
ConstructorsConstructorDescriptionDefaultBinderFactory(Map<String, BinderConfiguration> binderConfigurations, BinderTypeRegistry binderTypeRegistry, BinderCustomizer binderCustomizer) -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()<T> Binder<T, ?, ?> Returns the binder instance associated with the given configuration name.booleanvoidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext) voidsetDefaultBinder(String defaultBinder) voidsetListeners(Collection<DefaultBinderFactory.Listener> listeners) voidstart()voidstop()Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.context.SmartLifecycle
getPhase, isAutoStartup, isPauseable, stop
-
Field Details
-
logger
protected final org.apache.commons.logging.Log logger
-
-
Constructor Details
-
DefaultBinderFactory
public DefaultBinderFactory(Map<String, BinderConfiguration> binderConfigurations, BinderTypeRegistry binderTypeRegistry, BinderCustomizer binderCustomizer)
-
-
Method Details
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) - Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware
-
setDefaultBinder
-
setListeners
-
destroy
public void destroy()- Specified by:
destroyin interfaceorg.springframework.beans.factory.DisposableBean
-
start
public void start()- Specified by:
startin interfaceorg.springframework.context.Lifecycle
-
stop
public void stop()- Specified by:
stopin interfaceorg.springframework.context.Lifecycle
-
isRunning
public boolean isRunning()- Specified by:
isRunningin interfaceorg.springframework.context.Lifecycle
-
getBinder
Description copied from interface:BinderFactoryReturns 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:
getBinderin interfaceBinderFactory- Type Parameters:
T- the primary binding type- Parameters:
name- the name of a binder configurationbindingTargetType- binding target type- Returns:
- the binder instance
-