public interface FirebirdEmbeddedProvider
Implementations that provide a Firebird Embedded library need to implement this interface to provide the necessary
information to identify if it is a suitable implementation. The implementations of this interface need to be listed
in META-INF/services/org.firebirdsql.jna.embedded.spi.FirebirdEmbeddedProvider
inside the jar that provides
the implementation.
For detailed requirements, see jdp-2020-05: Firebird Embedded locator service provider
This class will be loaded using ServiceLoader
. Implementations must provide a no-arg constructor.
Modifier and Type | Method and Description |
---|---|
FirebirdEmbeddedLibrary |
getFirebirdEmbeddedLibrary()
Get an instance of the provided Firebird Embedded library.
|
java.lang.String |
getPlatform()
Platform of this Firebird Embedded library.
|
java.lang.String |
getVersion()
Get the Firebird server version of this provider.
|
java.lang.String getPlatform()
Applies the platform naming conventions of JNA.
"win32-x86-64"
for Windows 64-bit (x86))java.lang.String getVersion()
Implementations should report a version similar as reported by isc_info_firebird_version
and as expected
by GDSServerVersion
, that is a format of
<platform>-<type><majorVersion>.<minorVersion>.<variant>.<buildNum>[-<revision>] <serverName>
,
where platform
is a two-character platform identification string, Windows for example is "WI",
type
is one of the three characters: "V" - production version, "T" - beta version, "X" - development
version.
This is not a hard requirement, but failure to comply may exclude the implementation from being used in features like selecting a suitable Firebird Embedded version based on version requirements (such a feature does not exist yet).
"WI-V3.0.5.33220 Firebird 3.0"
)FirebirdEmbeddedLibrary getFirebirdEmbeddedLibrary() throws FirebirdEmbeddedLoadingException
For example, implementations could unpack a Firebird Embedded library to the filesystem, or try and find a Firebird instance installed on the system.
If the provider has to perform initialization before the embedded library is usable (eg copy resources from the classpath to a temporary location), this must be done in this method.
Implementations must be able to handle multiple calls to this method. It is allowed to return the same library instance on subsequent invocations.
FirebirdEmbeddedLoadingException
- For exceptions loading or finding Firebird EmbeddedCopyright © 2001-2024 Jaybird (Firebird JDBC) team. All rights reserved.