- java.lang.Object
-
- org.jooq.impl.DefaultRecordListenerProvider
-
- All Implemented Interfaces:
Serializable
,RecordListenerProvider
public class DefaultRecordListenerProvider extends Object implements RecordListenerProvider, Serializable
A default implementation forRecordListenerProvider
.This implementation just wraps an instance of
RecordListener
, always providing the same.- Author:
- Lukas Eder
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DefaultRecordListenerProvider(RecordListener listener)
Create a new provider instance from an argument listener.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description RecordListener
provide()
Provide aRecordListener
instance.static RecordListenerProvider[]
providers(RecordListener... listeners)
Convenience method to construct an array ofDefaultRecordListenerProvider
from an array ofRecordListener
instances.String
toString()
-
-
-
Constructor Detail
-
DefaultRecordListenerProvider
public DefaultRecordListenerProvider(RecordListener listener)
Create a new provider instance from an argument listener.- Parameters:
listener
- The argument listener.
-
-
Method Detail
-
providers
public static RecordListenerProvider[] providers(RecordListener... listeners)
Convenience method to construct an array ofDefaultRecordListenerProvider
from an array ofRecordListener
instances.
-
provide
public final RecordListener provide()
Description copied from interface:RecordListenerProvider
Provide aRecordListener
instance.Implementations are free to choose whether this method returns new instances at every call or whether the same instance is returned repetitively.
A
RecordListener
shall be provided exactly once perUpdatableRecord
manipulation, i.e. perRecordContext
.- Specified by:
provide
in interfaceRecordListenerProvider
- Returns:
- An
RecordListener
instance. - See Also:
RecordListener
,RecordContext
,DefaultRecordListenerProvider
-
-