public class GDSFactory
extends java.lang.Object
GDSFactory
exists to provide a way to obtain objects
implementing GDS and Clumplet.Constructor and Description |
---|
GDSFactory() |
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,
java.lang.String databasePath)
Create JDBC URL for the specified GDS type and database path.
|
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()
public static java.lang.String getJdbcUrl(GDSType gdsType, java.lang.String databasePath)
gdsType
- type of the plugin, to which operation will be delegated to.databasePath
- path to the database.public 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
Copyright © 2001-2021 Jaybird (Firebird JDBC/JCA) team. All rights reserved.