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

public abstract Class AbstractItemWriteListener

extends Object
implements ItemWriteListener
Class Inheritance
All Implemented Interfaces
jakarta.batch.api.chunk.listener.ItemWriteListener
Imports
java.util.List

The AbstractItemWriteListener provides default implementations of less commonly implemented methods.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
afterWrite(List<Object>
specifies the items about to be written.
items
)

Implements jakarta.batch.api.chunk.listener.ItemWriteListener.afterWrite.

Override this method if the ItemWriteListener will do something after the items are written.
public void
beforeWrite(List<Object>
specifies the items about to be written.
items
)

Implements jakarta.batch.api.chunk.listener.ItemWriteListener.beforeWrite.

Override this method if the ItemWriteListener will do something before the items are written.
public void
onWriteError(List<Object>
specifies the items about to be written.
items
,
Exception
specifies the exception thrown by the item writer.
ex
)

Implements jakarta.batch.api.chunk.listener.ItemWriteListener.onWriteError.

Override this method if the ItemWriteListener will do something when the ItemWriter writeItems method throws an exception.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

AbstractItemWriteListenerback to summary
public AbstractItemWriteListener()

Method Detail

afterWriteback to summary
public void afterWrite(List<Object> items) throws Exception

Implements jakarta.batch.api.chunk.listener.ItemWriteListener.afterWrite.

Override this method if the ItemWriteListener will do something after the items are written. The default implementation does nothing.

Parameters
items:List<Object>

specifies the items about to be written.

Annotations
@Override
Exceptions
Exception:
(or subclass) if an error occurs.
beforeWriteback to summary
public void beforeWrite(List<Object> items) throws Exception

Implements jakarta.batch.api.chunk.listener.ItemWriteListener.beforeWrite.

Override this method if the ItemWriteListener will do something before the items are written. The default implementation does nothing.

Parameters
items:List<Object>

specifies the items about to be written.

Annotations
@Override
Exceptions
Exception:
(or subclass) if an error occurs.
onWriteErrorback to summary
public void onWriteError(List<Object> items, Exception ex) throws Exception

Implements jakarta.batch.api.chunk.listener.ItemWriteListener.onWriteError.

Override this method if the ItemWriteListener will do something when the ItemWriter writeItems method throws an exception. The default implementation does nothing.

Parameters
items:List<Object>

specifies the items about to be written.

ex:Exception

specifies the exception thrown by the item writer.

Annotations
@Override
Exceptions
Exception:
(or subclass) if an error occurs.