Package org.jooq.impl
Class DefaultTransactionListenerProvider
- java.lang.Object
-
- org.jooq.impl.DefaultTransactionListenerProvider
-
- All Implemented Interfaces:
java.io.Serializable,TransactionListenerProvider
public class DefaultTransactionListenerProvider extends java.lang.Object implements TransactionListenerProvider, java.io.Serializable
A default implementation forTransactionListenerProvider.This implementation just wraps an instance of
TransactionListener, always providing the same.- Author:
- Lukas Eder
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DefaultTransactionListenerProvider(TransactionListener 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 TransactionListenerprovide()Provide anTransactionListenerinstance.static TransactionListenerProvider[]providers(TransactionListener... listeners)Convenience method to construct an array ofDefaultTransactionListenerProviderfrom an array ofTransactionListenerinstances.java.lang.StringtoString()
-
-
-
Constructor Detail
-
DefaultTransactionListenerProvider
public DefaultTransactionListenerProvider(TransactionListener listener)
Create a new provider instance from an argument listener.- Parameters:
listener- The argument listener.
-
-
Method Detail
-
providers
public static TransactionListenerProvider[] providers(TransactionListener... listeners)
Convenience method to construct an array ofDefaultTransactionListenerProviderfrom an array ofTransactionListenerinstances.
-
provide
public final TransactionListener 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:
TransactionListener,TransactionProvider,DefaultTransactionListenerProvider
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-