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 TransactionListener
provide()
Provide anTransactionListener
instance.static TransactionListenerProvider[]
providers(TransactionListener... listeners)
Convenience method to construct an array ofDefaultTransactionListenerProvider
from an array ofTransactionListener
instances.java.lang.String
toString()
-
-
-
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 ofDefaultTransactionListenerProvider
from an array ofTransactionListener
instances.
-
provide
public final TransactionListener 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:
TransactionListener
,TransactionProvider
,DefaultTransactionListenerProvider
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-