Class ItemStreamSupport
java.lang.Object
org.springframework.batch.infrastructure.item.ItemStreamSupport
- All Implemented Interfaces:
ItemStream, org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanNameAware
- Direct Known Subclasses:
AbstractItemStreamItemReader, AbstractItemStreamItemWriter, ChunkMonitor
public abstract class ItemStreamSupport
extends Object
implements ItemStream, org.springframework.beans.factory.BeanNameAware
Support class for
ItemStreams. Provides a default name for components that can
be used as a prefix for keys in the ExecutionContext and which can be
overridden by the bean name if the component is a Spring managed bean.- Author:
- Dave Syer, Dean de Bree, Mahmoud Ben Hassine, Stefano Cordio, Jimmy Praet
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@Nullable StringgetName()Get the name of the componentvoidsetBeanName(String name) Set the name of the bean in the bean factory that created this bean.protected voidvoidThe name of the component which will be used as a stem for keys in theExecutionContext.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ItemStream
close, open, update
-
Constructor Details
-
ItemStreamSupport
public ItemStreamSupport()
-
-
Method Details
-
setName
The name of the component which will be used as a stem for keys in theExecutionContext. Subclasses should provide a default value, e.g. the short form of the class name.- Parameters:
name- the name for the component
-
setBeanName
Set the name of the bean in the bean factory that created this bean. The bean name will only be used as name of the component in case it hasn't already been explicitly set to a value other than the default.setName(String)- Specified by:
setBeanNamein interfaceorg.springframework.beans.factory.BeanNameAware- Since:
- 6.0
- See Also:
-
getName
-
setExecutionContextName
-
getExecutionContextKey
-