Class MyChunkListener
java.lang.Object
jakarta.batch.api.chunk.listener.AbstractChunkListener
com.ibm.jbatch.tck.artifacts.specialized.MyChunkListener
- All Implemented Interfaces:
jakarta.batch.api.chunk.listener.ChunkListener
,jakarta.batch.api.listener.StepListener
@Named("myChunkListener")
public class MyChunkListener
extends jakarta.batch.api.chunk.listener.AbstractChunkListener
implements jakarta.batch.api.listener.StepListener
Originally this class was going to be used to check that we could view an earlier-thrown
exception via StepContext.getException() in each of afterChunk(), onError(Exception).
After a mailing list comment that we should relax the requirements on the implementation
to make the exception immediately visible to other artifacts, we agreed to only check
that we saw the expected exception in afterStep().
The quick change then was to recast this MyChunkListener as both a ChunkListener and
StepListener.
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class jakarta.batch.api.chunk.listener.AbstractChunkListener
afterChunk, onError
-
Constructor Details
-
MyChunkListener
public MyChunkListener()
-
-
Method Details
-
beforeChunk
- Specified by:
beforeChunk
in interfacejakarta.batch.api.chunk.listener.ChunkListener
- Overrides:
beforeChunk
in classjakarta.batch.api.chunk.listener.AbstractChunkListener
- Throws:
Exception
-
beforeStep
- Specified by:
beforeStep
in interfacejakarta.batch.api.listener.StepListener
- Throws:
Exception
-
afterStep
- Specified by:
afterStep
in interfacejakarta.batch.api.listener.StepListener
- Throws:
Exception
-