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
ItemStream
s. 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 String
getName()
Get the name of the componentvoid
setBeanName
(String name) Set the name of the bean in the bean factory that created this bean.protected void
void
The name of the component which will be used as a stem for keys in theExecutionContext
.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.batch.infrastructure.item.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:
setBeanName
in interfaceorg.springframework.beans.factory.BeanNameAware
- Since:
- 6.0
- See Also:
-
BeanNameAware.setBeanName(String)
-
getName
Get the name of the component- Returns:
- the name of the component
-
setExecutionContextName
-
getExecutionContextKey
-