public class DefaultTransactionListenerProvider extends java.lang.Object implements TransactionListenerProvider, java.io.Serializable
TransactionListenerProvider
.
This implementation just wraps an instance of TransactionListener
, always
providing the same.
Constructor and Description |
---|
DefaultTransactionListenerProvider(TransactionListener listener)
Create a new provider instance from an argument listener.
|
Modifier and Type | Method and Description |
---|---|
TransactionListener |
provide()
Provide an
TransactionListener instance. |
static TransactionListenerProvider[] |
providers(TransactionListener... listeners)
Convenience method to construct an array of
DefaultTransactionListenerProvider from an array of
TransactionListener instances. |
java.lang.String |
toString() |
public DefaultTransactionListenerProvider(TransactionListener listener)
listener
- The argument listener.public static TransactionListenerProvider[] providers(TransactionListener... listeners)
DefaultTransactionListenerProvider
from an array of
TransactionListener
instances.public final TransactionListener provide()
TransactionListener
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 to
DSLContext.transaction(TransactionalRunnable)
or similar API.
provide
in interface TransactionListenerProvider
TransactionListener
instance.TransactionListener
,
TransactionProvider
,
DefaultTransactionListenerProvider
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2018. All Rights Reserved.