- java.lang.Object
-
- org.jooq.impl.DefaultDiagnosticsListenerProvider
-
- All Implemented Interfaces:
Serializable
,DiagnosticsListenerProvider
public class DefaultDiagnosticsListenerProvider extends Object implements DiagnosticsListenerProvider, Serializable
A default implementation forDiagnosticsListenerProvider
.This implementation just wraps an instance of
DiagnosticsListener
, always providing the same.- Author:
- Lukas Eder
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DefaultDiagnosticsListenerProvider(DiagnosticsListener 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 DiagnosticsListener
provide()
Provide anDiagnosticsListener
instance.static DiagnosticsListenerProvider[]
providers(DiagnosticsListener... listeners)
Convenience method to construct an array ofDefaultDiagnosticsListenerProvider
from an array ofDiagnosticsListener
instances.String
toString()
-
-
-
Constructor Detail
-
DefaultDiagnosticsListenerProvider
public DefaultDiagnosticsListenerProvider(DiagnosticsListener listener)
Create a new provider instance from an argument listener.- Parameters:
listener
- The argument listener.
-
-
Method Detail
-
providers
public static DiagnosticsListenerProvider[] providers(DiagnosticsListener... listeners)
Convenience method to construct an array ofDefaultDiagnosticsListenerProvider
from an array ofDiagnosticsListener
instances.
-
provide
public final DiagnosticsListener provide()
Description copied from interface:DiagnosticsListenerProvider
Provide anDiagnosticsListener
instance.Implementations are free to choose whether this method returns new instances at every call or whether the same instance is returned repetitively.
The lifecycle of the
DiagnosticsListener
is not specified. New instances can be provided any time clients want to reset their diagnostics.- Specified by:
provide
in interfaceDiagnosticsListenerProvider
- Returns:
- A
DiagnosticsListener
instance. - See Also:
DiagnosticsListener
,DefaultDiagnosticsListenerProvider
-
-