Top Description Methods
jakarta.batch.api.chunk.listener

public Interface ChunkListener

Known Direct Implementers
jakarta.batch.api.chunk.listener.AbstractChunkListener

ChunkListener intercepts chunk processing.

Method Summary

Modifier and TypeMethod and Description
public void
afterChunk()

The afterChunk method receives control after processing of the current chunk ends.

public void
beforeChunk()

The beforeChunk method receives control before processing of the next chunk begins.

public void
onError(Exception
specifies the exception that caused the roll back.
ex
)

The onError method receives control before the chunk transaction is rolled back.

Method Detail

afterChunkback to summary
public void afterChunk() throws Exception

The afterChunk method receives control after processing of the current chunk ends. This method is invoked in the same transaction as the chunk processing.

Exceptions
Exception:
throw if an error occurs.
beforeChunkback to summary
public void beforeChunk() throws Exception

The beforeChunk method receives control before processing of the next chunk begins. This method is invoked in the same transaction as the chunk processing.

Exceptions
Exception:
throw if an error occurs.
onErrorback to summary
public void onError(Exception ex) throws Exception

The onError method receives control before the chunk transaction is rolled back. Note afterChunk is not invoked in this case.

Parameters
ex:Exception

specifies the exception that caused the roll back.

Exceptions
Exception:
throw if an error occurs.