public final class GDSFactory
extends java.lang.Object
GDSFactory exists to provide a way to obtain objects
implementing GDS and Clumplet.| Modifier and Type | Method and Description |
|---|---|
static java.lang.Class<?> |
getConnectionClass(GDSType gdsType)
Get class extending the
FBConnection
that will be instantiated when new connection is created. |
static FbDatabaseFactory |
getDatabaseFactoryForType(GDSType gdsType) |
static java.lang.String |
getDatabasePath(GDSType gdsType,
java.lang.String jdbcUrl)
Get path to the database from the specified JDBC URL.
|
static java.lang.String |
getDatabasePath(GDSType gdsType,
java.lang.String server,
java.lang.Integer port,
java.lang.String path)
Get connection string for the specified server name, port and database
name/path.
|
static GDSType |
getDefaultGDSType()
Get default GDS type.
|
static java.lang.String |
getJdbcUrl(GDSType gdsType,
DatabaseConnectionProperties dbConnectionProperties)
Create JDBC URL for the specified GDS type and database connection properties.
|
static java.lang.String |
getJdbcUrl(GDSType gdsType,
java.lang.String databasePath)
Deprecated.
Use
getJdbcUrl(GDSType, DatabaseConnectionProperties); will be removed in Jaybird 6 |
static GDSFactoryPlugin |
getPlugin(GDSType gdsType)
Get plugin for the specified GDS type.
|
static java.util.Set<java.lang.String> |
getSupportedProtocols()
Get collection of the supported JDBC protocols.
|
static GDSType |
getTypeForProtocol(java.lang.String jdbcUrl)
Get GDS type for the specified JDBC URL.
|
static void |
registerPlugin(GDSFactoryPlugin plugin)
Register plugin for this factory.
|
public static void registerPlugin(GDSFactoryPlugin plugin)
plugin - instance of GDSFactoryPlugin to register.public static GDSType getDefaultGDSType()
GDSType.public static FbDatabaseFactory getDatabaseFactoryForType(GDSType gdsType)
public static java.lang.String getDatabasePath(GDSType gdsType, java.lang.String server, java.lang.Integer port, java.lang.String path) throws GDSException
gdsType - instance of GDSType for which connection string should be returned.server - name or IP address of the database server, applies only to IPC and TCP connection modes, in other cases
should be null.port - port on which database server opened listening socket, applies to TCP connection mode only, may be
null.path - database name or path to the databaseGDSException - if connection string cannot be obtained.public static java.lang.String getDatabasePath(GDSType gdsType, java.lang.String jdbcUrl) throws GDSException
gdsType - type of the plugin, to which operation will be delegated to.jdbcUrl - JDBC url from which the database path must be extracted.GDSException - error when database path cannot be extracted.public static java.util.Set<java.lang.String> getSupportedProtocols()
@Deprecated public static java.lang.String getJdbcUrl(GDSType gdsType, java.lang.String databasePath)
getJdbcUrl(GDSType, DatabaseConnectionProperties); will be removed in Jaybird 6gdsType - type of the plugin, to which operation will be delegated to.databasePath - path to the database.public static java.lang.String getJdbcUrl(GDSType gdsType, DatabaseConnectionProperties dbConnectionProperties) throws java.sql.SQLException
gdsType - type of the plugin, to which operation will be delegated to.dbConnectionProperties - Database connection propertiesjava.sql.SQLException - When required information is missing to build the URLpublic static GDSType getTypeForProtocol(java.lang.String jdbcUrl)
jdbcUrl - JDBC URL for which GDS type should be obtained.GDSType.public static java.lang.Class<?> getConnectionClass(GDSType gdsType)
FBConnection
that will be instantiated when new connection is created. This method
finds the plugin for the specified type and delegates the call to it.gdsType - instance of GDSType@InternalApi public static GDSFactoryPlugin getPlugin(GDSType gdsType)
gdsType - GDS type.GDSFactoryPluginjava.lang.IllegalArgumentException - if specified type is not known.Copyright © 2001-2023 Jaybird (Firebird JDBC) team. All rights reserved.