java.lang.Object
org.jooq.impl.DefaultTransactionListenerProvider
- All Implemented Interfaces:
Serializable
,TransactionListenerProvider
public class DefaultTransactionListenerProvider
extends Object
implements TransactionListenerProvider, Serializable
A default implementation for
TransactionListenerProvider
.
This implementation just wraps an instance of TransactionListener
, always
providing the same.
- Author:
- Lukas Eder
- See Also:
-
Constructor Summary
ConstructorDescriptionCreate a new provider instance from an argument listener. -
Method Summary
Modifier and TypeMethodDescriptionfinal TransactionListener
provide()
Provide anTransactionListener
instance.static TransactionListenerProvider[]
providers
(TransactionListener... listeners) Convenience method to construct an array ofDefaultTransactionListenerProvider
from an array ofTransactionListener
instances.toString()
-
Constructor Details
-
DefaultTransactionListenerProvider
Create a new provider instance from an argument listener.- Parameters:
listener
- The argument listener.
-
-
Method Details
-
providers
Convenience method to construct an array ofDefaultTransactionListenerProvider
from an array ofTransactionListener
instances. -
provide
Description copied from interface:TransactionListenerProvider
Provide anTransactionListener
instance.Implementations are free to choose whether this method returns new instances at every call or whether the same instance is returned repetitively.
A
TransactionListener
shall be provided exactly once per transaction lifecycle, i.e. per call toDSLContext.transaction(TransactionalRunnable)
or similar API.- Specified by:
provide
in interfaceTransactionListenerProvider
- Returns:
- An
TransactionListener
instance. - See Also:
-
toString
-