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.StepListenerOriginally 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 Constructor Description MyChunkListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterStep()voidbeforeChunk()voidbeforeStep()
-
-
-
Method Detail
-
beforeChunk
public void beforeChunk() throws Exception- Specified by:
beforeChunkin interfacejakarta.batch.api.chunk.listener.ChunkListener- Overrides:
beforeChunkin classjakarta.batch.api.chunk.listener.AbstractChunkListener- Throws:
Exception
-
beforeStep
public void beforeStep() throws Exception- Specified by:
beforeStepin interfacejakarta.batch.api.listener.StepListener- Throws:
Exception
-
-