- java.lang.Object
-
- org.jooq.impl.DefaultExecuteListenerProvider
-
- All Implemented Interfaces:
Serializable
,ExecuteListenerProvider
public class DefaultExecuteListenerProvider extends Object implements ExecuteListenerProvider, Serializable
A default implementation forExecuteListenerProvider
.This implementation just wraps an instance of
ExecuteListener
, always providing the same.- Author:
- Lukas Eder
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DefaultExecuteListenerProvider(ExecuteListener 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 ExecuteListener
provide()
Provide anExecuteListener
instance.static ExecuteListenerProvider[]
providers(ExecuteListener... listeners)
Convenience method to construct an array ofDefaultExecuteListenerProvider
from an array ofExecuteListener
instances.String
toString()
-
-
-
Constructor Detail
-
DefaultExecuteListenerProvider
public DefaultExecuteListenerProvider(ExecuteListener listener)
Create a new provider instance from an argument listener.- Parameters:
listener
- The argument listener.
-
-
Method Detail
-
providers
public static ExecuteListenerProvider[] providers(ExecuteListener... listeners)
Convenience method to construct an array ofDefaultExecuteListenerProvider
from an array ofExecuteListener
instances.
-
provide
public final ExecuteListener provide()
Description copied from interface:ExecuteListenerProvider
Provide anExecuteListener
instance.Implementations are free to choose whether this method returns new instances at every call or whether the same instance is returned repetitively.
An
ExecuteListener
shall be provided exactly once per query execution lifecycle, i.e. perExecuteContext
.- Specified by:
provide
in interfaceExecuteListenerProvider
- Returns:
- An
ExecuteListener
instance. - See Also:
ExecuteListener
,ExecuteContext
,DefaultExecuteListenerProvider
-
-