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