类 CompositeCustomerUpdateLineTokenizer
- java.lang.Object
- org.springframework.batch.core.listener.StepExecutionListenerSupport
- org.springframework.batch.sample.domain.trade.CompositeCustomerUpdateLineTokenizer
- 所有已实现的接口:
StepExecutionListener
,StepListener
,LineTokenizer
public class CompositeCustomerUpdateLineTokenizer extends StepExecutionListenerSupport implements LineTokenizer
CompositeLineTokenizer
that delegates the tokenization of a line to one of two potential tokenizers. The file format in this case uses one character, either F, A, U, or D to indicate whether or not the line is an a footer record, or a customer add, update, or delete, and will delegate accordingly.- 从以下版本开始:
- 2.0
- 作者:
- Lucas Ward
构造器概要
构造器 构造器 说明 CompositeCustomerUpdateLineTokenizer()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 void
beforeStep(StepExecution stepExecution)
Initialize the state of the listener with theStepExecution
from the current scope.void
setCustomerTokenizer(LineTokenizer customerTokenizer)
Set theLineTokenizer
that will be used to tokenize any lines that begin with A, U, or D, and are thus a customer operation.void
setFooterTokenizer(LineTokenizer footerTokenizer)
Set theLineTokenizer
that will be used to tokenize any lines that being with F and is thus a footer record.FieldSet
tokenize(java.lang.String line)
Yields the tokens resulting from the splitting of the suppliedline
.从类继承的方法 org.springframework.batch.core.listener.StepExecutionListenerSupport
afterStep
构造器详细资料
CompositeCustomerUpdateLineTokenizer
public CompositeCustomerUpdateLineTokenizer()
方法详细资料
tokenize
public FieldSet tokenize(java.lang.String line)
从接口复制的说明:LineTokenizer
Yields the tokens resulting from the splitting of the suppliedline
.- 指定者:
tokenize
在接口中LineTokenizer
- 参数:
line
- the line to be tokenized (can benull
)- 返回:
- the resulting tokens
beforeStep
public void beforeStep(StepExecution stepExecution)
从接口复制的说明:StepExecutionListener
Initialize the state of the listener with theStepExecution
from the current scope.- 指定者:
beforeStep
在接口中StepExecutionListener
- 覆盖:
beforeStep
在类中StepExecutionListenerSupport
- 参数:
stepExecution
- instance ofStepExecution
.
setCustomerTokenizer
public void setCustomerTokenizer(LineTokenizer customerTokenizer)
Set theLineTokenizer
that will be used to tokenize any lines that begin with A, U, or D, and are thus a customer operation.- 参数:
customerTokenizer
- tokenizer to delegate to for customer operation records
setFooterTokenizer
public void setFooterTokenizer(LineTokenizer footerTokenizer)
Set theLineTokenizer
that will be used to tokenize any lines that being with F and is thus a footer record.- 参数:
footerTokenizer
- tokenizer to delegate to for footer records