public interface Extension
An Extension
can be registered programmatically through
PostgresqlConnectionConfiguration
or automatically using
the ServiceLoader
mechanism.
The global extension registration through Java's ServiceLoader
mechanism, allows third-party extensions to be auto-detected and automatically registered based on
what is available in the classpath.
Specifically, a custom extension can be registered by supplying its fully qualified class name in a file named io.r2dbc.postgresql.extension.Extension
within the
/META-INF/services
directory in its enclosing JAR file.
PostgresqlConnectionConfiguration.Builder.autodetectExtensions(boolean)
parameter to
false.
Extension implementations must have a default constructor if registered via the ServiceLoader
. When registered through
PostgresqlConnectionConfiguration
the default constructor is not required to be public
.
When registered via the ServiceLoader
the default constructor must be public
.
Copyright © 2020. All rights reserved.