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
ConstructorsConstructorDescriptionCreate a new provider instance from an argument listener. -
Method Summary
Modifier and TypeMethodDescriptionfinal TransactionListenerprovide()Provide anTransactionListenerinstance.static TransactionListenerProvider[]providers(TransactionListener... listeners) Convenience method to construct an array ofDefaultTransactionListenerProviderfrom an array ofTransactionListenerinstances.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 ofDefaultTransactionListenerProviderfrom an array ofTransactionListenerinstances. -
provide
Description copied from interface:TransactionListenerProviderProvide anTransactionListenerinstance.Implementations are free to choose whether this method returns new instances at every call or whether the same instance is returned repetitively.
A
TransactionListenershall be provided exactly once per transaction lifecycle, i.e. per call toDSLContext.transaction(TransactionalRunnable)or similar API.- Specified by:
providein interfaceTransactionListenerProvider- Returns:
- An
TransactionListenerinstance. - See Also:
-
toString
-