Package org.jooq.impl
Class DefaultExecuteListenerProvider
- java.lang.Object
-
- org.jooq.impl.DefaultExecuteListenerProvider
-
- All Implemented Interfaces:
java.io.Serializable
,ExecuteListenerProvider
public class DefaultExecuteListenerProvider extends java.lang.Object implements ExecuteListenerProvider, java.io.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.java.lang.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
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-