|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.batch.core.listener.StepExecutionListenerSupport org.springframework.batch.sample.domain.trade.CompositeCustomerUpdateLineTokenizer
public class CompositeCustomerUpdateLineTokenizer
Composite LineTokenizer
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.
Constructor Summary | |
---|---|
CompositeCustomerUpdateLineTokenizer()
|
Method Summary | |
---|---|
void |
beforeStep(StepExecution stepExecution)
Initialize the state of the listener with the StepExecution from
the current scope. |
void |
setCustomerTokenizer(LineTokenizer customerTokenizer)
Set the LineTokenizer 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 the LineTokenizer that will be used to tokenize any lines that being with
F and is thus a footer record. |
FieldSet |
tokenize(String line)
Yields the tokens resulting from the splitting of the supplied line . |
Methods inherited from class org.springframework.batch.core.listener.StepExecutionListenerSupport |
---|
afterStep |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CompositeCustomerUpdateLineTokenizer()
Method Detail |
---|
public FieldSet tokenize(String line)
LineTokenizer
line
.
tokenize
in interface LineTokenizer
line
- the line to be tokenized (can be null
)
public void beforeStep(StepExecution stepExecution)
StepExecutionListener
StepExecution
from
the current scope.
beforeStep
in interface StepExecutionListener
beforeStep
in class StepExecutionListenerSupport
public void setCustomerTokenizer(LineTokenizer customerTokenizer)
LineTokenizer
that will be used to tokenize any lines that begin with
A, U, or D, and are thus a customer operation.
customerTokenizer
- public void setFooterTokenizer(LineTokenizer footerTokenizer)
LineTokenizer
that will be used to tokenize any lines that being with
F and is thus a footer record.
footerTokenizer
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |